]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Reorganize enable/disable path for multi-scheduler support
authorTejun Heo <tj@kernel.org>
Fri, 6 Mar 2026 17:58:02 +0000 (07:58 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 6 Mar 2026 17:58:02 +0000 (07:58 -1000)
commitdbd542a8fac7bcfba91e353f2a522e1bf2fbee27
treed428a1e93ad2a7aecbb858fc4682222c1c212e7b
parent0454a604b98a9bf301e82860cd216ec4ac563668
sched_ext: Reorganize enable/disable path for multi-scheduler support

In preparation for multiple scheduler support, reorganize the enable and
disable paths to make scheduler instances explicit. Extract
scx_root_disable() from scx_disable_workfn(). Rename scx_enable_workfn()
to scx_root_enable_workfn(). Change scx_disable() to take @sch parameter
and only queue disable_work if scx_claim_exit() succeeds for consistency.
Move exit_kind validation into scx_claim_exit(). The sysrq handler now
prints a message when no scheduler is loaded.

These changes don't materially affect user-visible behavior.

v2: Keep scx_enable() name as-is and only rename the workfn to
    scx_root_enable_workfn(). Change scx_enable() return type to s32.

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