STRUCT TTM_LRU_BULK_MOVE(9)
π struct ttm_lru_bulk_move(9) β the Kernel API Manual moment π
okay so bestie, we're in the Kernel API Manual today and the main character is literally struct ttm_lru_bulk_move(9). yes it's a whole vibe. let's go β¨
πΈ NAME πΈ
struct ttm_lru_bulk_move β bestie... the name field is empty in the original and honestly? iconic. mysterious. it's giving "no thoughts, head empty" but make it a kernel struct. so just know that this is struct ttm_lru_bulk_move and that's the whole name. periodt π
β¨ SYNOPSIS β¨
here's the whole glow-up, copy-pasted with love (do NOT retype this by hand, i'm begging):
struct ttm_lru_bulk_move {
struct ttm_lru_bulk_move_pos
pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY];
struct list_head cursor_list;
};
like. look at her. two members, one big mood. π¦
π«Ά Members (yes, capital M, she's official) π«Ά
posβ this one is the first/last lru entry for resources in the each domain/priority. (and yes, the original really does say "the each", we're keeping it, it's canon π). it's a whole 2D array situation:pos[TTM_NUM_MEM_TYPES][TTM_MAX_BO_PRIORITY], so like... domains times priorities. math girlie behavior ngl πβ¨cursor_listβ the list of cursors currently traversing any of the sublists ofpos. protected by the ttm device's lru_lock π so like, respect the lock, don't be that person. no cap.
π Description π
so what IS this thing? it's the container for the current bulk move state π β the little home where all the bulk-move bookkeeping lives. she should be used with ttm_lru_bulk_move_init and ttm_bo_set_bulk_move, those are her two besties, they come as a set. π«Ά
β οΈ ok this part is IMPORTANT so listen up bestie: all BOs in a bulk_move structure need to share the same reservation object to ensure that the bulk as a whole is locked for eviction even if only one BO of the bulk is evicted. like, the whole squad shares the same reservation object or the locking doesn't hold. no solo acts. not me being dramatic, that's just literally what it says ππ
π SEE ALSO π
the whole friend group, in order, because we do not leave anyone out:
- Kernel file
./include/drm/ttm/ttm_resource.h TTM_NUM_MOVE_FENCES(9)enum ttm_lru_item_type(9)struct ttm_lru_item(9)ttm_lru_item_init(9)struct ttm_resource_manager(9)struct ttm_bus_placement(9)struct ttm_resource(9)ttm_lru_item_to_res(9)struct ttm_lru_bulk_move_pos(9)struct ttm_resource_cursor(9)struct ttm_kmap_iter_iomap(9)struct ttm_kmap_iter_linear_io(9)ttm_resource_manager_set_used(9)ttm_resource_manager_used(9)ttm_resource_manager_cleanup(9)ttm_resource_manager_for_each_res(9)
and that's the page, bestie!! π source/version shoutout: this one lives in ./include/drm/ttm and it's dated October 2026 β yes, future girlie behavior, we love to see it π« mwah, go lock your bulk properly, ily, bye π¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms