amdgpu_ttm_evict_resources(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🫢:


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