STRUCT XE_PAGEFAULT_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

struct xe_pagefault_queue β€” the Xe pagefault queue, but make it consumer πŸ’… this is the section 9 kernel API manual page bestie, we're in the big leagues now


✨ SYNOPSIS ✨

okay so picture this struct, absolutely iconic, here's the whole thing verbatim:

struct xe_pagefault_queue {
    struct xe_device *xe;
    void *data;
    u32 size;
    u32 head;
    u32 tail;
    spinlock_t lock;
    struct work_struct worker;
 };

🫢 Members 🫢

  • xe β€” the back-pointer to the Xe device, she knows where she came from πŸ’–
  • data β€” the actual data in the queue, containing struct xe_pagefault, and bestie it is protected by lock πŸ”’
  • size β€” size of the queue, in bytes, no cap
  • head β€” head pointer, also in bytes, and it gets moved by the producer β€” protected by lock too 🫢
  • tail β€” tail pointer, in bytes, moved by the consumer this time β€” yep, protected by lock 🌸
  • lock β€” literally protects the page fault queue, that's her whole job πŸ‘‘
  • worker β€” the worker that processes page faults, main character energy fr fr ⚑

πŸ’œ Description πŸ’œ

So what's the vibe? This queue is used to capture all device page faults for deferred processing β€” like, every single one, she's collecting them πŸ¦‹

And the sizing advice, listen up: size this queue to absorb the device's worst-case number of outstanding faults. Not the average case. Not the "probably fine" case. The worst-case one 😭 do not come crying to me when your queue overflows because you sized it optimistically.

ngl the sizing thing is the actual important part, don't skip it πŸ’€

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/gpu/drm/xe/xe_pagefault_types.h
  • struct xe_pagefault(9)

k bye bestie, this page came to you from ./drivers/gpu/drm/xe, dated October 2026 β€” go read xe_pagefault(9) next, iykyk πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from