ttm_bo_evict_first(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ttm_bo_evict_first(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the kernel API manual, section 9, and you've stumbled onto ttm_bo_evict_first. Welcome, bestie, you're gonna slay this one. ✨


🌸 NAME 🌸

ttm_bo_evict_first β€” evict the first bo on the manager's LRU list. that's it, that's the whole vibe. one (1) bo, first in line, getting evicted. it's giving "line leader gets told to leave" energy πŸ’€


✨ SYNOPSIS ✨

int ttm_bo_evict_first (struct ttm_device *bdev , struct
       ttm_resource_manager *man , struct ttm_operation_ctx *ctx );

yes she takes three (3) args and returns an int. no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • bdev β€” the ttm device. this is the whole device we're working with, the main character of the hardware situation πŸ‘‘
  • man β€” the manager whose bo to evict. literally the manager. and whose bo we're kicking out. respect the possessiveness, it's important πŸ’…
  • ctx β€” the TTM operation ctx governing the eviction. the rules of engagement, the vibe check for the whole eviction, yk? πŸ¦‹

⭐ RETURN ⭐

returns 0 if it worked OR if the resource just... disappeared (gone, vanished, no notes 😭), and a negative error code on error. so like, zero is the good outcome, negative means something went sideways. periodt. πŸ”₯

ngl, the "or the resource disappeared" clause is doing a lot of heavy lifting here β€” zero covers success and the resource peacing out, so don't go assuming a 0 means the resource is still around. it's giving "ambiguous but fine" energy πŸ™ˆ

🌈 SEE ALSO 🌈

the whole friend group, fr fr β€” all of these live right here in the kernel file ./drivers/gpu/drm/ttm/ttm_bo.c:

like, go read them, iykyk πŸ’–


and that's the page !! sourced from ./drivers/gpu/drm/ttm, dated October 2026, and it's ttm_bo_evict_first(9) and she ate, no crumbs πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from