STRUCT TTM_LRU_BULK_MOVE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of pos. 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:


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