STRUCT TTM_LRU_WALK_ARG(9)
π struct ttm_lru_walk_arg(9) β like, the Kernel API Manual, bestie π
Okay so picture this: we're deep in the drm/ttm lore, and there's this little struct that's literally the shared glue holding all the BO LRU walk variants together. Common part energy β¨ β it's the friend group's group chat, the thing every variant shows up to. Obsessed.
β¨ NAME β¨
struct ttm_lru_walk_arg β the common part for the variants of BO LRU walk. No cap, that's its whole job π«Ά
πΈ SYNOPSIS πΈ
struct ttm_lru_walk_arg {
struct ttm_operation_ctx *ctx;
struct ww_acquire_ctx *ticket;
bool trylock_only;
bool sleeping_lock;
};
Look at her. Four fields, zero drama, main character energy π
π¦ Members π¦
ctxβ a pointer to thestruct ttm_operation_ctx. Yeah, she points at the operation context, that's the vibe πticketβ thestruct ww_acquire_ctx, if any. Key words: if any π sometimes she's just out here beingNULL.trylock_onlyβ literally only use trylock for locking. That's it. That's the whole field. Trylock only, periodt. π₯sleeping_lockβ use sleeping locks even when the ticket isNULLπ€
β οΈ Real talk bestie:trylock_onlyhas precedence oversleeping_lock. So if both are set,trylock_onlywins the argument. Not me picking favorites but likeβ¦ it does π
π SEE ALSO π
Everything's connected, iykyk β go look at the kernel file ./include/drm/ttm/ttm_bo.h and then the whole squad:
enum ttm_bo_type(9)struct ttm_buffer_object(9)struct ttm_bo_kmap_obj(9)struct ttm_operation_ctx(9)struct ttm_lru_walk(9)struct ttm_bo_shrink_flags(9)ttm_bo_reserve(9)ttm_bo_reserve_slowpath(9)ttm_bo_move_null(9)ttm_bo_unreserve(9)ttm_kmap_obj_virtual(9)struct ttm_bo_lru_cursor(9)ttm_bo_lru_for_each_reserved_guarded(9)
Like, the entire friend group showed up to the function. Slay π
And that's the page, bestie β brought to you from ./include/drm/ttm, dated October 2026, officially filed under struct ttm_lru_walk_arg(9) πΈ Go forth and walk those LRUs responsibly β¨π
π¦ 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