i915_gem_evict_something(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so, bestie, welcome to the i915_gem_evict_something(9) page from the Kernel API Manual β€” the one that’s literally about evicting vmas to make room for binding a new one. It’s giving β€œcleanup era,” but for address space. πŸ’…βœ¨

i915_gem_evict_something β€” evict vmas to make room for binding a new one. No cap, that’s the whole assignment. 🫢

🌸 SYNOPSIS 🌸

bestie, here’s the signature in all its glory:

int i915_gem_evict_something (struct i915_address_space *vm , struct
       i915_gem_ww_ctx *ww , u64 min_size , u64 alignment , unsigned long color
       , u64 start , u64 end , unsigned flags );

πŸ’– ARGUMENTS πŸ’–

  • vm β€” the address space we’re evicting from. That’s our main character. ✨
  • ww β€” an optional struct i915_gem_ww_ctx. Optional, bestie, so don’t panic. πŸ¦‹
  • min_size β€” the size of the desired free space. We need room, okay? πŸŽ€
  • alignment β€” the alignment constraint of the desired free space. It’s gotta line up cute. πŸ’…
  • color β€” the color for the desired space. Yes, color. We love a colorful free space. 🌈
  • start β€” start (inclusive) of the range from which to evict objects. Inclusive, so don’t forget that edge. πŸ”₯
  • end β€” end (exclusive) of the range from which to evict objects. Exclusive, periodt. πŸ’€
  • flags β€” additional flags to control the eviction algorithm. Flags on flags, iykyk. 🧚

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so the whole vibe: this function will try to evict vmas until it finds a free space that satisfies the requirements. But listen β€” callers must check first whether any such hole exists already before calling this function. That’s not a suggestion, bestie. 🫢

This function is used by the object/vma binding code. Love that for it. πŸ”₯

Since this function is only used to free up virtual address space, it only ignores pinned vmas β€” and not an object where the backing storage itself is pinned. Hence obj->pages_pin_count does not protect against eviction. Please don’t forget that, fr fr. 😭

To clarify (because clarity is cute): this is for freeing up virtual address space, not for freeing memory in e.g. the shrinker. Periodt. 🌈

⭐ SEE ALSO ⭐


That’s the page, bestie! Its source/version line points to ./drivers/gpu/drm/i915, the date is October 2026, and the manual name is i915_gem_evict_something(9). Stay evicting, stay iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from