STRUCT XE_SCHED_JOB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 else
  • q β€” the exec queue 🌈 she's the exec queue this job is chillin' with
  • refcount β€” ref count of this job πŸ’– literally just the reference count, keeping track of who's holding on
  • fence β€” 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 not
  • user_fence.addr β€” address to write to πŸ¦‹ the address, specifically
  • user_fence.value β€” write back value πŸ“ the value that gets written back
  • lrc_seqno β€” LRC seqno ⭐ yep, that's the LRC seqno
  • migrate_flush_flags β€” Additional flush flags for migration jobs 🧚 extra flush flags, specifically for migration jobs, okurr
  • sample_timestamp β€” Sampling of job timestamp in TDR πŸ• the job timestamp gets sampled in TDR, that's the whole thing
  • ring_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, bestie
  • ring_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 necessary
  • ggtt β€” mapped in ggtt 🌸 she's mapped in ggtt, that's it
  • restore_replay β€” job being replayed for restore πŸ’œ this job is being replayed, and it's for restore
  • last_replay β€” last job being replayed πŸ‘‘ the last job being replayed, literally the final boss of replay
  • ptrs β€” 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