STRUCT XE_MADVISE_DETAILS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct 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 πŸ”₯

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