STRUCT TTM_RESOURCE(9)
π struct ttm_resource(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one is literally about struct ttm_resource and it's giving "small struct, big responsibilities" energy π
πΈ NAME πΈ
struct ttm_resource β
and honestly? the manpage leaves the description blank after the dash. no cap, there's just... nothing there π so we move on, bestie, the good stuff is right below π«Ά
β SYNOPSIS β
struct ttm_resource {
unsigned long start;
size_t size;
uint32_t mem_type;
uint32_t placement;
struct ttm_bus_placement bus;
struct ttm_buffer_object *bo;
struct dmem_cgroup_pool_state *css;
struct ttm_lru_item lru;
};
like, look at her. eight fields, zero notes, all business π§
π Members π
okay so let's go field by field, main character by main character π
startβ where the allocation actually starts, bestie. that's it, that's the field π«sizeβ the actual size of the resource in bytes. factual. measured. not vibes πΈmem_typeβ the resource type of the allocation. classic. iconic. it tells you what kind of thing this is π₯placementβ placement flags!! flags!! we love flags πbusβ the placement on the io bus that the CPU can actually reach. think of it as the "yes you can touch it" address situation π¦boβ a weak reference to the BO, and it's protected byttm_device::lru_lock. weak reference!! she does NOT own it, so do not go freeing things through her π and yes, the lock protection is real, respect the lock πcssβ the cgroup state that this resource is charged to. memory accounting, bestie, somebody's paying for this πΈlruβ the least recently used list entry, seettm_resource_manager.lru. LRU girlies rise up π
π Description π
it's the structure that says where a buffer object lives and how much space it's using β the placement + the space resources, all wrapped up in one little struct π literally the "who, what, and how much room" of a buffer object, periodt β¨
π₯ SEE ALSO π₯
kernel file ./include/drm/ttm/ttm_resource.h, plus this whole friend group right here:
TTM_NUM_MOVE_FENCES(9)enum ttm_lru_item_type(9)struct ttm_lru_item(9)ttm_lru_item_init(9)struct ttm_resource_manager(9)struct ttm_bus_placement(9)ttm_lru_item_to_res(9)struct ttm_lru_bulk_move_pos(9)struct ttm_lru_bulk_move(9)struct ttm_resource_cursor(9)struct ttm_kmap_iter_iomap(9)struct ttm_kmap_iter_linear_io(9)ttm_resource_manager_set_used(9)ttm_resource_manager_used(9)ttm_resource_manager_cleanup(9)ttm_resource_manager_for_each_res(9)
aaaand that's the whole page, bestie π«Ά mwah π this one came at you from ./include/drm/ttm, dated October 2026 β go forth and manage your resources responsibly, ily πβ¨
π¦ 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