madvise_purgeable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 🌈

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