Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched_ext: Fix stray scx_root usage in task_can_run_on_remote_rq()

task_can_run_on_remote_rq() takes @sch but it is using scx_root when
incrementing SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, which is inconsistent and
gets in the way of implementing multiple scheduler support. Use @sch
instead. As currently scx_root is the only possible scheduler instance, this
doesn't cause any behavior changes.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

Tejun Heo f75efc8f edf005fa

+1 -2
+1 -2
kernel/sched/ext.c
··· 1622 1622 1623 1623 if (!scx_rq_online(rq)) { 1624 1624 if (enforce) 1625 - __scx_add_event(scx_root, 1626 - SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, 1); 1625 + __scx_add_event(sch, SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, 1); 1627 1626 return false; 1628 1627 } 1629 1628