STRUCT XE_EXEC_QUEUE_OPS(9)
β¨ 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 theinitfor 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 callxe_exec_queue_fini(which will in turn call thefinibackend 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 beforeresume, with the caveat thatsuspend_waitreturns before callingsuspendagain. so like, stack them carefully bestie πsuspend_waitβ wait for an exec queue to suspend executing, and it should be called aftersuspend. it lives in the dma-fencing path, thus it must return within a reasonable amount of time (no camping out in there π).- a
-ETIMEreturn shall indicate an error waiting for suspend, resulting in the associated VM getting killed π harsh but true. - a
-EAGAINreturn 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 π
- a
suspend_wait_blockingβ likesuspend_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 likesuspend_wait.
β οΈ yeah that last part is spelledbansin the original and we're keeping it, don't come for me π the point is: same timeout behaviour assuspend_wait.
resumeβ resume exec queue execution. the queue must be in a suspended state, and the dma fence returned from the most recentsuspendcall 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
- 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