STRUCT XE_SHRINKER(9)
π 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 anrwlock_tand it is doing the absolute most to keep the numbers honest π₯shrinkable_pagesβ number of pages that are currently shrinkable, along, okurrr β¨purgeable_pagesβ number of pages that are currently purgeable, also along, not me keeping this list going πshrinkβ pointer to the mm shrinker, the actual icon of this struct ngl πpm_workerβ astruct work_struct, worker to wake up the device if required πΈ like a little alarm clock for your GPU bestie
π SEE ALSO π
- The kernel file
./drivers/gpu/drm/xe/xe_shrinker.c xe_shrinker_mod_pages(9)xe_shrinker_create(9)
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
- 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