STRUCT I915_SCHED_ENGINE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct i915_sched_engine(9) πŸ’…

okay so welcome to the Kernel API Manual page for struct i915_sched_engine(9) β€” yes bestie, we're doing the scheduler engine itself, and we're gonna go through every single field like it's a group-chat receipt. no cap. ✨


🌸 NAME 🌸

struct i915_sched_engine β€” scheduler engine 🫢


✨ SYNOPSIS ✨

       struct i915_sched_engine {
           struct kref ref;
           spinlock_t lock;
           struct list_head requests;
           struct list_head hold;
           struct tasklet_struct tasklet;
           struct i915_priolist default_priolist;
           int queue_priority_hint;
           struct rb_root_cached queue;
           bool no_priolist;
           void *private_data;
           void (*destroy)(struct kref *kref);
           bool (*disabled)(struct i915_sched_engine *sched_engine);
           void (*kick_backend)(const struct i915_request *rq, int prio);
           void (*bump_inflight_request_prio)(struct i915_request *rq, int
       prio);
           void (*retire_inflight_request_prio)(struct i915_request *rq);
           void (*schedule)(struct i915_request *request, const struct
       i915_sched_attr *attr);
        };

🫢 Members 🫢

  • ref β€” reference count of schedule engine object. keeping track, iconic behavior πŸ’…
  • lock β€” protects requests in priority lists, requests, hold and tasklet while running. it's giving "do not touch while I'm working" energy.
  • requests β€” list of requests inflight on this schedule engine. these are the ones currently out there doing their thing.
  • hold β€” list of ready requests, but on hold. ready but waiting, lowkey main character suspense.
  • tasklet β€” softirq tasklet for submission. yes, it's the submission tasklet.
  • default_priolist β€” priority list for I915_PRIORITY_NORMAL. the normal-priority hangout spot.
  • queue_priority_hint β€” Highest pending priority.

so when we add requests into the queue, or adjust the priority of executing requests, we compute the maximum priority of those pending requests. we can then use this value to determine if we need to preempt the executing requests to service the queue.

but here's the catch 😭 β€” we may have recorded the priority of an inflight request we wanted to preempt, but it has since completed. so at the time of dequeuing, the priority hint may no longer match the highest available request priority. it's giving stale-receipt energy, fr fr.

  • queue β€” queue of requests, in priority lists. the actual lineup, organized by priority.
  • no_priolist β€” priority lists disabled. when this is on, the priority-list life is not happening.
  • private_data β€” private data of the submission backend. backend's own little stash.
  • destroy β€” destroy schedule engine / cleanup in backend. the cleanup era.
  • disabled β€” check if backend has disabled submission. vibe check for "is submission off?"
  • kick_backend β€” kick backend after a request's priority has changed. yes, a little nudge after the priority glow-up.
  • bump_inflight_request_prio β€” update priority of an inflight request. priority adjustment for something already out there.
  • retire_inflight_request_prio β€” indicate request is retired to priority tracking. letting priority tracking know this one is done.
  • schedule β€” adjust priority of request.
Call when the priority on a request has changed and it and its dependencies may need rescheduling. Note the request itself may not be ready to run!

πŸ’– Description πŸ’–

A schedule engine represents a submission queue with different priority bands. It contains all the common state (relative to the backend) to queue, track, and submit a request. honestly? obsessed. it's the backend-relative home base for all that queueing, tracking, and submitting. πŸ¦‹

This object at the moment is quite i915 specific but will transition into a container for the drm_gpu_scheduler plus a few other variables once the i915 is integrated with the DRM scheduler. so rn it's very i915-coded, but it's got future-container plans. 🌈


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./drivers/gpu/drm/i915/i915_scheduler_types.h β€” go read the source, bestie, iykyk πŸ‘‘

mwah πŸ’‹ this page came from ./drivers/gpu/drm/i915, dated October 2026, and it's the struct i915_sched_engine(9) source/version footer energy. periodt. πŸŽ€

πŸ“¦ where this page comes from