ttm_bo_move_to_lru_tail(9)
πΈ 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:
ttm_bo_set_bulk_move(9)ttm_bo_eviction_valuable(9)ttm_bo_evict_first(9)ttm_bo_alloc_at_place(9)struct ttm_bo_evict_walk(9)ttm_bo_evict_cgroup(9)ttm_bo_pin(9)ttm_bo_unpin(9)ttm_bo_alloc_resource(9)ttm_bo_validate(9)ttm_bo_init_reserved(9)ttm_bo_init_validate(9)ttm_bo_unmap_virtual(9)ttm_bo_wait_ctx(9)struct ttm_bo_swapout_walk(9)ttm_bo_swapout(9)ttm_bo_populate(9)
π 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
- 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