STRUCT TTM_BO_LRU_CURSOR(9)
β¨ struct ttm_bo_lru_cursor(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for struct ttm_bo_lru_cursor β it's the iterator cursor you use for looping over the TTM LRU list π
iykyk
π NAME π
struct ttm_bo_lru_cursor β the iterator cursor for TTM LRU list looping. that's literally it, that's the whole vibe π¦
πΈ SYNOPSIS πΈ
struct ttm_bo_lru_cursor {
struct ttm_resource_cursor res_curs;
struct ttm_buffer_object *bo;
bool needs_unlock;
struct ttm_lru_walk_arg *arg;
};
π Members π
res_cursβ an embeddedstruct ttm_resource_cursor. it's tucked right in there, no cap π«Άboβ the buffer object pointer, valid if a buffer object is refcounted, andNULLotherwise. so like, sometimes it's there, sometimes it's not, main character energy either way β¨needs_unlockβ valid iffbo != NULL. the bo resv needs an unlock before the next iteration or after the loop exits. do not sleep on this one β if you skip the unlock bestie, that's a whole situation π valid iffbo != NULL, meaning ifboisNULLthis flag is just not it.argβ pointer to the common BO LRU walk arguments. it's giving "shared state, but make it chic" π
π₯ SEE ALSO π₯
Kernel file ./include/drm/ttm/ttm_bo.h, plus all of these icons:
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_arg(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), ttm_bo_lru_for_each_reserved_guarded(9)
like, go read all of them, they're literally all connected ππ
fr fr bestie:needs_unlockonly means something whenboisn'tNULL. remember that and you'll slay π«Ά
that's the whole page! π this gem lives in ./include/drm/ttm, dated October 2026, and it's from the Kernel API Manual β periodt π
π
π¦ 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