]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Separate out scx_kick_cpu() and add @sch to it
authorTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
commit9fc687edf205dbc45bbdec60ea31e934a05ab6bc
treecb0d577d940991029c62125d3d95d5484ba5873c
parent7852e0fd1de05efadcd8b6f72140cd208c79ba56
sched_ext: Separate out scx_kick_cpu() and add @sch to it

In preparation for multiple scheduler support, separate out scx_kick_cpu()
from scx_bpf_kick_cpu() and add the @sch parameter to it. scx_bpf_kick_cpu()
now acquires an RCU read lock, reads $scx_root, and calls scx_kick_cpu()
with it if non-NULL. The passed in @sch parameter is not used yet.

Internal uses of scx_bpf_kick_cpu() are converted to scx_kick_cpu(). Where
$sch is available, it's used. In the pick_task_scx() path where no
associated scheduler can be identified, $scx_root is used directly. Note
that $scx_root cannot be NULL in this case.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c