ttm_lru_bulk_move_tail(9)
π ttm_lru_bulk_move_tail(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to the ttm_lru_bulk_move_tail(9) page from the Kernel API Manual π this one's a lil function in the TTM resource world and she's lowkey iconic, so let's get into it π
β¨ NAME β¨
ttm_lru_bulk_move_tail β bulk move range of resources to the LRU tail π
πΈ SYNOPSIS πΈ
void ttm_lru_bulk_move_tail (struct ttm_lru_bulk_move *bulk );
that's it, that's the whole vibe π«Ά void return, one pointer, very demure β¨
π¦ ARGUMENTS π¦
bulkβ the bulk move structure π« that's the whole thing, she's the star of the show π
π DESCRIPTION π
so what she does is bulk move BOs to the LRU tail π₯ like, a whole range of resources, all shuffled to the back of the line at once β no cap, that's the move π
β οΈ okay but hear me on this one: this is only valid to use when the driver makes sure that resource order never changes π like if your driver is out there reordering stuff, this function is NOT the one, do not pass go π«
and the other big requirement, fr fr: it should be called with ttm_device.lru_lock held π like actually held, by you, before you call her. no lock, no love π
π SEE ALSO π
go peek at the kernel file first, it's giving source of truth π:
./drivers/gpu/drm/ttm/ttm_resource.c
and then the whole friend group π«Ά:
ttm_resource_cursor_init(9),ttm_resource_cursor_fini(9)ttm_lru_bulk_move_init(9),ttm_lru_bulk_move_fini(9)ttm_resource_init(9),ttm_resource_fini(9)ttm_resource_try_charge(9),ttm_resource_intersects(9),ttm_resource_compatible(9)ttm_resource_manager_init(9),ttm_resource_manager_usage(9),ttm_resource_manager_debug(9)ttm_resource_manager_first(9),ttm_resource_manager_next(9)ttm_lru_first_res_or_null(9)ttm_kmap_iter_iomap_init(9),Linear io iterator(9)ttm_kmap_iter_linear_io_init(9),ttm_kmap_iter_linear_io_fini(9)ttm_resource_manager_create_debugfs(9)ttm_resource_manager_dmem_reclaim(9)ttm_resource_manager_set_dmem_region(9)
okay that's the page!! mwah π this dropped from ./drivers/gpu/drm/ttm in October 2026, and it's literally titled ttm_lru_bulk_move_tail(9) β go forth and bulk move responsibly bestie ππ
π¦ 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