STRUCT XE_EXEC_QUEUE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct xe_exec_queue_ops(9) ✨

okay so this is from the Kernel API Manual and it's literally the submission backend exec queue operations β€” like the vibe check for how a backend actually drives an exec queue πŸ’…


🌸 NAME 🌸

struct xe_exec_queue_ops β€” submission backend exec queue operations. that's it, that's the whole name, but bestie it's a big deal πŸŽ€


✨ SYNOPSIS ✨

struct xe_exec_queue_ops {
    int (*init)(struct xe_exec_queue *q);
    void (*kill)(struct xe_exec_queue *q);
    void (*fini)(struct xe_exec_queue *q);
    void (*destroy)(struct xe_exec_queue *q);
    int (*set_priority)(struct xe_exec_queue *q, enum xe_exec_queue_priority priority);
    int (*set_timeslice)(struct xe_exec_queue *q, u32 timeslice_us);
    int (*set_preempt_timeout)(struct xe_exec_queue *q, u32 preempt_timeout_us);
    int (*set_multi_queue_priority)(struct xe_exec_queue *q, enum xe_multi_queue_priority priority);
    int (*suspend)(struct xe_exec_queue *q);
    int (*suspend_wait)(struct xe_exec_queue *q);
    int (*suspend_wait_blocking)(struct xe_exec_queue *q);
    void (*resume)(struct xe_exec_queue *q);
    bool (*reset_status)(struct xe_exec_queue *q);
};

like, that's the whole squad right there 🫢 every one of these is a function pointer a backend fills in to make queues actually do stuff.


πŸ¦‹ Members πŸ¦‹

  • init β€” initialize the exec queue for the submission backend. the glow-up before the work starts ✨
  • kill β€” kill inflight submissions for this backend. yeah. it does what it says 😭 no survivors.
  • fini β€” undoes the init for the submission backend. the uno reverse card πŸŽ€
  • destroy β€” destroy the exec queue for the submission backend.
⚠️ ok this one has a rule and it is NOT optional: the backend function must call xe_exec_queue_fini (which will in turn call the fini backend function) to ensure the queue is properly cleaned up. skip that and you're leaving a mess, no cap.
  • set_priority β€” set the priority for the exec queue. main character energy selection, basically πŸ‘‘
  • set_timeslice β€” set the timeslice for the exec queue. how long it gets to shine ⏳
  • set_preempt_timeout β€” set the preemption timeout for the exec queue. how long we wait before yeeting it off the CPU πŸ”₯
  • set_multi_queue_priority β€” set multi queue priority. group project priorities fr fr 🧚
  • suspend β€” suspend the exec queue from executing. it's allowed to be called multiple times in a row before resume, with the caveat that suspend_wait returns before calling suspend again. so like, stack them carefully bestie πŸ’…
  • suspend_wait β€” wait for an exec queue to suspend executing, and it should be called after suspend. it lives in the dma-fencing path, thus it must return within a reasonable amount of time (no camping out in there πŸ™ˆ).
    • a -ETIME return shall indicate an error waiting for suspend, resulting in the associated VM getting killed πŸ’€ harsh but true.
    • a -EAGAIN return indicates the wait should be tried again. if the wait is within a work item, the work item should be requeued as a deadlock avoidance mechanism. iykyk πŸŒ€
  • suspend_wait_blocking β€” like suspend_wait, but it waits uninterruptibly (it does not abort on the calling task's signals). it's for cleanup/undo paths that must complete a suspend on behalf of a queue that may belong to a different process than the caller: a signal to the caller must not abandon the wait, which would leave the other process's queue suspended forever (cross-process DoS). 🚨 a timeout bans like suspend_wait.
⚠️ yeah that last part is spelled bans in the original and we're keeping it, don't come for me 😭 the point is: same timeout behaviour as suspend_wait.
  • resume β€” resume exec queue execution. the queue must be in a suspended state, and the dma fence returned from the most recent suspend call must be signalled when this function is called. read that twice, it's a whole vibe check 🌈
  • reset_status β€” check the exec queue reset status. is it okay?? is it not?? find out πŸ“

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/gpu/drm/xe/xe_exec_queue_types.h
  • enum xe_multi_queue_priority(9)
  • struct xe_exec_queue_group(9)
  • struct xe_exec_queue(9)

go read those next, bestie, the lore goes deep πŸ“šβœ¨


πŸ’– that's the whole page!! πŸ’– sourced from ./drivers/gpu/drm/xe, dated October 2026 β€” so like, future vibes, iconic behaviour, periodt. take care of your queues and they'll take care of you πŸ«ΆπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from