STRUCT XE_MADVISE_DETAILS(9)
π struct xe_madvise_details(9) π
okay so bestie, welcome to the Kernel API Manual β we're talking about struct xe_madvise_details today and honestly? she's a little supporting character with main character energy. let's get into it π
β¨ NAME β¨
struct xe_madvise_details β the argument that gets passed to madvise_funcs, and yes she eats every time π«Ά
πΈ SYNOPSIS πΈ
struct xe_madvise_details {
struct drm_pagemap *dpagemap;
bool has_purged_bo;
u64 retained_ptr;
};
π¦ Members π¦
dpagemapβ a reference-counted pointer to astruct drm_pagemap. that's it, that's the whole vibe. refcounted means somebody's keeping score, iykyk πhas_purged_boβ tracks whether any BO got purged. it's giving "was anybody lost in the purge" energy, and it exists for the purgeable state. lowkey important πretained_ptrβ a user pointer pointing at the retained value. also for the purgeable state. she holds onto things, ngl π§
π Description π
so here's the tea β β the madvise IOCTL handler might have more to say than just the user-space args. like, sometimes there's extra info that needs to get passed into the madvise_func that handles the specific madvise type. and that's literally what struct xe_madvise_details is for π«Ά
use a struct_xe_madvise_details for that extra info, and extend the struct whenever you need to. she's flexible, she grows with you, no cap πβ¨
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/xe/xe_vm_madvise.c madvise_purgeable(9)madvise_range_needs_invalidation(9)xe_vm_madvise_ioctl(9)
go read those, bestie, they're all in the same friend group π
reminder bestie: this whole thing lives in ./drivers/gpu/drm/xe and the version stamp says October 2026 β so like, mark your calendar, she's from the future π«
okay that's the whole page, mwah π struct xe_madvise_details(9) out ππ
π¦ 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