amdgpu_ttm_evict_resources(9)
β¨ amdgpu_ttm_evict_resources(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a little function from the amdgpu fam and honestly it's giving "cleanup crew, but make it glam" π§ we're literally just yeeting memory buffers out of a list, no cap.
πΈ NAME πΈ
amdgpu_ttm_evict_resources β evict memory buffers π«Ά
β SYNOPSIS β
int amdgpu_ttm_evict_resources (struct amdgpu_device *adev , int
mem_type );
that's it, that's the whole vibe check π₯
π ARGUMENTS π
adevβ the amdgpu device object π like, the actual GPU friend we're working on.mem_typeβ the memory type of the BO's that are getting evicted β¨ (yes, BO = buffer object, iykyk).
π DESCRIPTION π
so what does it do bestie? it evicts all the mem_type buffers sitting on the lru list of that memory type π periodt. every single one on that list, gone, evicted, bye π
π RETURN π
0 for success π or a negative error code if it fails π (yes, negative β check it, don't ignore it, fr fr).
π¦ SEE ALSO π¦
the kernel file it lives in, iconic behavior honestly:
./drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
and the whole friend group π«Ά:
amdgpu_evict_flags(9)amdgpu_ttm_map_buffer(9)amdgpu_ttm_copy_mem_to_mem(9)amdgpu_res_cpu_visible(9)amdgpu_ttm_domain_start(9)amdgpu_ttm_mmio_remap_alloc_sgt(9)amdgpu_ttm_tt_create(9)amdgpu_ttm_tt_get_userptr(9)amdgpu_ttm_tt_set_userptr(9)amdgpu_ttm_tt_pde_flags(9)amdgpu_ttm_tt_pte_flags(9)amdgpu_ttm_access_memory(9)amdgpu_ttm_training_reserve_vram_fini(9)amdgpu_ttm_alloc_mmio_remap_bo(9)amdgpu_ttm_free_mmio_remap_bo(9)amdgpu_ttm_enable_buffer_funcs(9)amdgpu_ttm_disable_buffer_funcs(9)amdgpu_ttm_clear_buffer(9)
ngl, read the related pages too β the lore is deep and you'll lowkey need it π
okay that's the page!! mwah π it comes from the ./drivers/gpu/drm/amd/amdgpu directory and the date on it is October 2026 πΈ so like, future vibes only. stay slay, go evict those buffers, and remember: amdgpu_ttm_evict_resources(9) ate and left no crumbs πβ¨
π¦ 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