static int balance_one(struct rq *rq, struct task_struct *prev)
{
- struct scx_sched *sch = scx_root;
+ struct scx_sched *sch = scx_root, *pos;
s32 cpu = cpu_of(rq);
lockdep_assert_rq_held(rq);
if (rq->scx.local_dsq.nr)
goto has_tasks;
- /* dispatch @sch */
- if (scx_dispatch_sched(sch, rq, prev))
- goto has_tasks;
+ /*
+ * TEMPORARY - Dispatch all scheds. This will be replaced by BPF-driven
+ * hierarchical operation.
+ */
+ list_for_each_entry_rcu(pos, &scx_sched_all, all)
+ if (scx_dispatch_sched(pos, rq, prev))
+ goto has_tasks;
/*
* Didn't find another task to run. Keep running @prev unless