madvise_purgeable(9)
okay so bestie, welcome to madvise_purgeable(9) β thatβs the manual name, and weβre in the Kernel API Manual π buckle up, this oneβs short but itβs got lore.
β¨ NAME β¨
madvise_purgeable β handle purgeable buffer object advice. thatβs the whole name sitch, and yes itβs giving kernel-internals main character energy π
π¦ SYNOPSIS π¦
okay hereβs the exact signature, copy it like your life depends on it:
void madvise_purgeable (struct xe_device *xe , struct xe_vm *vm , struct
xe_vma **vmas , int num_vmas , struct drm_xe_madvise *op , struct
xe_madvise_details *details );
no cap, thatβs the whole call π
π ARGUMENTS π
xeβ XE device. literally the device, bestie π«Άvmβ VM. sheβs mysterious but essential πvmasβ Array of VMAs. yes, an array, plural, iconic β¨num_vmasβ Number of VMAs. the count, the vibe check π’opβ Madvise operation. the operation in question πdetailsβ Madvise details for return values. where the receipts go π§Ύ
π₯ DESCRIPTION π₯
okay so this function handles the DONTNEED/WILLNEED/PURGED states β those three, exactly, no extras, periodt β¨
It also tracks if any BO was purged in details->has_purged_bo for later copy to userspace. thatβs the whole tracking vibe: if a BO got purged, itβs noted there so it can be copied to userspace later π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_vm_madvise.c struct xe_madvise_details(9)madvise_range_needs_invalidation(9)xe_vm_madvise_ioctl(9)
go read those too, bestie, itβs giving linked-list of lore π¦
mwah π this lil page is from ./drivers/gpu/drm/xe and itβs dated October 2026 β slay, bye! πΈ
π¦ 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