Hi Tvrtko, On Thu, Dec 3, 2026 at 2:27 AM Tvrtko Ursulin <[email protected]> wrote: > > Strictly speaking you could give all schedulers to all entities, right? > > Existing sched->score tracking *should* make sure different entities > > submitting in turn get assign different schedulers via > > drm_sched_pick_best(). > > > > With that I am not sure you would need to complicate things with own > > sched selection logic - sounds like it is partly implementing different > > drm_sched_pick_best().
I think drm_sched_pick_best() can replace the part that picks the core. I'll look into it, thanks. > > In general, the problem with why a single entity does not work really is > > that drm_sched_entity_select_rq() has this artificial coupling > > preventing run queue / scheduler changes while there are queued or > > active jobs in the entity. In the ideal world it should work. > > Scratch this, I got confused due context switching. One entity shouldn't > execute in parallel to itself is fundamental. Yes. So an entity alone can't run jobs that don't depend on each other concurrently on the cores of hardware like rocket. I think drm_sched needs a new queue object, separate from the entity, that orders jobs only by their dependencies: - An entity orders its jobs in two ways: 1. the dependency fences of each job 2. the order in which the jobs were queued - The problem is 2. Because of it, a job waits for the job queued before it even without a dependency, so rocket had to work around it with one entity per core. - 1 can express 2: if each job depends on the previous one, we get 2. So an interface that orders jobs by 1 alone is the more general one. I also think drm_sched should provide this, as other multi-core accelerators need the same (e.g. the thames driver). I only did it in rocket to start small. Please let me know if I got anything wrong so far. Otherwise I'll send an RFC. -- Thanks, Gyeyoung
