STRUCT XE_SHRINKER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xe_shrinker(9)

okay bestie, welcome to the Kernel API Manual ✨ this is the page for struct xe_shrinker, which is literally the per-device shrinker 🫢 no cap, that's the whole vibe of the NAME section, we're moving on.


🌸 NAME 🌸

struct xe_shrinker β€” per-device shrinker πŸ’–


✨ SYNOPSIS ✨

here's the struct in all its iconic glory, copy it exactly bestie, don't be weird about it πŸ‘‘

struct xe_shrinker {
    struct xe_device *xe;
    rwlock_t lock;
    long shrinkable_pages;
    long purgeable_pages;
    struct shrinker *shrink;
    struct work_struct pm_worker;
 };

πŸŽ€ Members πŸŽ€

okay so every field, one by one, no skips, we don't do skips here πŸ’…

  • xe β€” back pointer to the device, like it knows where it came from, main character energy fr fr πŸ¦‹
  • lock β€” the lock protecting accounting. it's an rwlock_t and it is doing the absolute most to keep the numbers honest πŸ”₯
  • shrinkable_pages β€” number of pages that are currently shrinkable, a long, okurrr ✨
  • purgeable_pages β€” number of pages that are currently purgeable, also a long, not me keeping this list going πŸ’€
  • shrink β€” pointer to the mm shrinker, the actual icon of this struct ngl πŸ‘‘
  • pm_worker β€” a struct work_struct, worker to wake up the device if required 🌸 like a little alarm clock for your GPU bestie

πŸ‘€ SEE ALSO πŸ‘€

go read those, iykyk 🌈


no warnings on this page bestie, but do not sleep on that lock β€” accounting without it is giving chaos πŸ™ˆ

okay that's the whole page, and before you go: this beauty lives in ./drivers/gpu/drm/xe, dated October 2026, and it's filed under struct xe_shrinker(9) ⭐ mwah, slay, periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from