ttm_bo_move_to_lru_tail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 ttm_bo_move_to_lru_tail(9) 🌸

okay so real talk, bestie β€” this one lives in the Kernel API Manual, and honestly? The NAME section is giving mysterious minimalist icon. It's literally just the function name and nothing else, no little one-liner tagline, no vibe description. Just:

ttm_bo_move_to_lru_tail β€” that's it, that's the name πŸ’…


✨ SYNOPSIS ✨

void ttm_bo_move_to_lru_tail (struct ttm_buffer_object *bo );

like, that's the whole thing. a void function, one argument, no return value. clean. simple. iconic πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bo β€” the buffer object. that's the one. the main character of this whole function, no cap 🫢

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie 🍡 β€” this function moves this BO to the tail of all the LRU lists that get used to look up and reserve an object. yes, all of them. she's thorough πŸ’…

⚠️ okay this part matters, don't skip it: this function must be called with struct ttm_global::lru_lock held. not optional. not "if you feel like it." held. locked. periodt πŸ”’

and why do we do this? the whole point is to make a BO less likely to be considered for eviction. you're basically putting your little object at the back of the line so the eviction algorithm looks at everybody else first. it's giving "no, after you" energy πŸ™ˆβœ¨


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” you can find all of these hanging out in the kernel file ./drivers/gpu/drm/ttm/ttm_bo.c:


🌈 and that's the whole page, bestie! sourced straight from ./drivers/gpu/drm/ttm, dated October 2026 β€” go forth and move those BOs to the tail, and please hold that lru_lock while you do it πŸ’œβœ¨

πŸ“¦ where this page comes from