Skip to contentSkip to conversation

Questions regarding DRM Scheduler Priority Levels

DISCUSSION Chenna Kesava Raju (QUIC) 3 participants 3 messages Nov 12, 2025

lore
Share & tools
lore
#0 lore raw

Hi All,

We are currently developing a driver using the Accel framework to enable applications to offload their tasks to the NPU.
As part of this effort, we are considering the use of the DRM scheduler for job management. These applications may have their own priority levels to manage task execution efficiently on the NPU. However, since the DRM scheduler currently supports only a limited set of job priority levels (DRM_SCHED_PRIORITY_KERNEL, DRM_SCHED_PRIORITY_HIGH, DRM_SCHED_PRIORITY_NORMAL, and DRM_SCHED_PRIORITY_LOW), we have a couple of questions:

* Are there any plans to increase the number of supported priority levels?
* Is there any flexibility or scope for customizing priority levels when using the DRM scheduler?

Thanks,
Chenna

#1 lore raw

Hi,

Quoted 7 lines · Chenna Kesava Raju (QUIC)

Hi All,

We are currently developing a driver using the Accel framework to enable applications to offload their tasks to the NPU.

As part of this effort, we are considering the use of the DRM scheduler for job management. These applications may have their own priority levels to manage task execution efficiently on the NPU. However, since the DRM scheduler currently supports only a limited set of job priority levels (DRM_SCHED_PRIORITY_KERNEL, DRM_SCHED_PRIORITY_HIGH, DRM_SCHED_PRIORITY_NORMAL, and DRM_SCHED_PRIORITY_LOW), we have a couple of questions:

* Are there any plans to increase the number of supported priority levels?

Not that I am aware of. Adding maintainers as well.

Quoted 2 lines

* Is there any flexibility or scope for customizing priority levels when using the DRM scheduler?

Maybe. What I am proposing is to rewrite the scheduling algorithm away from strict priority ordering and per-priority run-queues, replacing it with a single run queue and virtual runtime based approach.

See:
https://lore.kernel.org/dri-devel/[email protected]/

If that goes in then it will be really easy to extend the range, or otherwise tweak it. Whether or not that is something that would be interesting for your use cases is the question. Perhaps you could share some more details on what kind of granularity and behaviour you are looking for?

Regards,

Tvrtko

#2 lore raw
Quoted 21 lines · Tvrtko Ursulin

Hi,

Quoted 17 lines · Chenna Kesava Raju (QUIC)

Hi All,

We are currently developing a driver using the Accel framework to enable
applications to offload their tasks to the NPU.

As part of this effort, we are considering the use of the DRM scheduler
for job management. These applications may have their own priority levels to manage task execution efficiently on the NPU. However, since
the DRM scheduler currently supports only a limited set of job priority
levels (DRM_SCHED_PRIORITY_KERNEL, DRM_SCHED_PRIORITY_HIGH, DRM_SCHED_PRIORITY_NORMAL, and DRM_SCHED_PRIORITY_LOW), we have a couple
of questions:

Note that many users (Nouveau, Xe, …) by now always use drm_sched with a 1:1 relationship between sched_entity and sched itself. So there isn't real scheduling anymore for many users and priority levels become pointless.

With the industry apparently moving to firmware scheduling, I suppose that big interest in features like more priority levels is little (though not non-existent. See Tvrtko's link).

So I guess the most interesting question is what the ringbuffer layout on your chip looks like. Nr of rings, way of creating them etc.

P.