]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/sched_ext: scx_qmap: Restart on hotplug instead of cpu_online/offline
authorTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:09:11 +0000 (08:09 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:25:07 +0000 (08:25 -1000)
commit89ddcc0bfda1a2bf2b38949c9c0b6984b7af6bd2
tree3441440cbd8071f6a080765331a93f5f60c42bf2
parent67edfa9eefe693bcc48e615241a89240006551ce
tools/sched_ext: scx_qmap: Restart on hotplug instead of cpu_online/offline

The cid mapping is built from the online cpu set at scheduler enable
and stays valid for that set; routine hotplug invalidates it. The
default cid behavior is to restart the scheduler so the mapping gets
rebuilt against the new online set, and that requires not implementing
cpu_online / cpu_offline (which suppress the kernel's ACT_RESTART).

Drop the two ops along with their print_cpus() helper - the cluster
view was only useful as a hotplug demo and is meaningless over the
dense cid space the scheduler will move to. Wire main() to handle the
ACT_RESTART exit by reopening the skel and reattaching, matching the
pattern in scx_simple / scx_central / scx_flatcg etc. Reset optind so
getopt re-parses argv into the fresh skel rodata each iteration.

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>
tools/sched_ext/scx_qmap.bpf.c
tools/sched_ext/scx_qmap.c