STRUCT TTM_BO_SHRINK_FLAGS(9)
π struct ttm_bo_shrink_flags (Kernel API Manual, bestie edition)
okay so real talk β this is a page from the Kernel API Manual about struct ttm_bo_shrink_flags, and it's literally just the little flag container that governs the bo shrinking behaviour β¨ like it's the vibe-check clipboard for how a buffer object gets shrunk. no cap, that's the whole assignment.
π NAME π
struct ttm_bo_shrink_flags β flags to govern the bo shrinking behaviour π¦
β¨ SYNOPSIS β¨
here's the whole struct, copy it exactly bestie:
struct ttm_bo_shrink_flags {
u32 purge : 1;
u32 writeback : 1;
u32 allow_move : 1;
};
three tiny bitfields, one big mood π
πΈ Members πΈ
these are the three icons and what each one does:
purgeβ purge the content rather than backing it up π like we're NOT keeping a copy, we're just yeeting it. gone. periodt.writebackβ attempt to immediately write content to swap space π₯ "immediately" is doing a lot of work in that sentence, but that's what it says.allow_moveβ allow moving to system before shrinking π§ this is typically not desired for zombie- or ghost objects β and yes, "zombie object" means objects with a zero gem object refcount π iykyk. ghost objects get the same treatment, no moving for them.
ngl the allow_move one is the sneaky member β it's giving "sure, relocate me first" energy, and for zombie/ghost objects that's exactly what you don't want π
π SEE ALSO π
Kernel file ./include/drm/ttm/ttm_bo.h β and here's the full squad of friends, all of them, in order:
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)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 that's a whole group chat right there π go read them, they ate π
that's the whole page, bestie β go shrink some bos responsibly π
this icon dropped from ./include/drm/ttm in October 2026, and the page itself is struct ttm_bo_shrink_flags(9). mwah, bye π«Άπ
π¦ 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