]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Make scx_enable() take scx_enable_cmd
authorTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:09:10 +0000 (08:09 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:25:07 +0000 (08:25 -1000)
commitc97ce728bcc43adcc861375f48433ac7adfd4e2e
treeeda7be04d8abdc3faa98f34db70658c5d0423abb
parent1e315c44aa91b4475e445d007151c13429ce7bce
sched_ext: Make scx_enable() take scx_enable_cmd

Pass struct scx_enable_cmd to scx_enable() rather than unpacking @ops
at every call site and re-packing into a fresh cmd inside. bpf_scx_reg()
now builds the cmd on its stack and hands it in; scx_enable() just
wires up the kthread work and waits.

Relocate struct scx_enable_cmd above scx_alloc_and_add_sched() so
upcoming patches that also want the cmd can see it.

No behavior change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Reviewed-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c