i915_gem_evict_something(9)
π 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 optionalstruct 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 β
- Kernel file
./drivers/gpu/drm/i915/i915_gem_evict.c i915_gem_evict_for_node(9)i915_gem_evict_vm(9)
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
- 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