diff options
| author | Tejun Heo <tj@kernel.org> | 2025-09-23 09:03:26 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-09-23 09:03:26 -1000 |
| commit | f75efc8f4c0d52f6fe53a0acd9629e3ac017fc3e (patch) | |
| tree | 483e0d6d259c30a80972432790b568cf29755684 | |
| parent | sched_ext: Improve SCX_KF_DISPATCH comment (diff) | |
| download | linux-f75efc8f4c0d52f6fe53a0acd9629e3ac017fc3e.tar.gz linux-f75efc8f4c0d52f6fe53a0acd9629e3ac017fc3e.zip | |
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>
| -rw-r--r-- | kernel/sched/ext.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 0f17b715461f..8769cfdc22e3 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -1622,8 +1622,7 @@ static bool task_can_run_on_remote_rq(struct scx_sched *sch, if (!scx_rq_online(rq)) { if (enforce) - __scx_add_event(scx_root, - SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, 1); + __scx_add_event(sch, SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE, 1); return false; } |
