STRUCT XE_SCHED_JOB(9)
β¨ struct xe_sched_job(9) β¨
okay bestie, welcome to the Kernel API Manual π
β this is the whole entire scoop on struct xe_sched_job, aka the Xe schedule job, aka the little guy that keeps track of your batch buffer. she's a struct, she's iconic, and she's got a lot of members, so buckle up π
πΈ NAME πΈ
struct xe_sched_job β Xe schedule job (batch buffer tracking) π¦
like, literally the scheduling job for Xe, and she's tracking your batch buffers. that's the vibe. no cap.
β SYNOPSIS β
struct xe_sched_job {
struct drm_sched_job drm;
struct xe_exec_queue *q;
struct kref refcount;
struct dma_fence *fence;
struct {
bool used;
u64 addr;
u64 value;
} user_fence;
u32 lrc_seqno;
u32 migrate_flush_flags;
u64 sample_timestamp;
bool ring_ops_flush_tlb;
bool ring_ops_force_reset;
bool ggtt;
bool restore_replay;
bool last_replay;
struct xe_job_ptrs ptrs[];
};
like, look at her. she's got layers π (and a flexible array member at the end, we love a queen who saves room for her per-instance pointers)
π MEMBERS π
okay so here's the member-by-member breakdown, and yes, we're doing all of them, because skipping members is not the vibe π
drmβ the base DRM scheduler job π«Ά like, the foundation, the main character energy underneath everything elseqβ the exec queue π she's the exec queue this job is chillin' withrefcountβ ref count of this job π literally just the reference count, keeping track of who's holding onfenceβ dma fence to indicate completion π₯ and listen, this is a 1 way relationship β job can safely reference fence, fence cannot safely reference job. that's it. one direction. no mutuals. don't get it twisted bestie πuser_fenceβ write back value when BB is complete β¨ (BB = the batch buffer, and this is where the value goes when it's done)user_fence.usedβ user fence is used π like, is it in use or notuser_fence.addrβ address to write to π¦ the address, specificallyuser_fence.valueβ write back value π the value that gets written backlrc_seqnoβ LRC seqno β yep, that's the LRC seqnomigrate_flush_flagsβ Additional flush flags for migration jobs π§ extra flush flags, specifically for migration jobs, okurrsample_timestampβ Sampling of job timestamp in TDR π the job timestamp gets sampled in TDR, that's the whole thingring_ops_flush_tlbβ The ring ops need to flush TLB before payload π so the ring ops have to flush the TLB before the payload. order matters, bestiering_ops_force_resetβ The ring ops need to trigger a reset before payload π₯ the ring ops need to trigger a reset before the payload. dramatic but necessaryggttβ mapped in ggtt πΈ she's mapped in ggtt, that's itrestore_replayβ job being replayed for restore π this job is being replayed, and it's for restorelast_replayβ last job being replayed π the last job being replayed, literally the final boss of replayptrsβ per instance pointers π the per-instance pointers, one per instance, living at the end of the struct as a flexible array member
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpu/drm/xe/xe_sched_job_types.h struct xe_job_ptrs(9)
like, go read those too, iykyk π
okay that's the whole page, bestie!! go forth and schedule your jobs π this came from ./drivers/gpu/drm/xe, dated October 2026, and honestly? iconic of them. 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