[PATCHSET sched_ext/for-7.4-fixes] sched_ext: Fix ops.enqueue/dispatch() calls before ops.cpu_online()

From: Tejun Heo

Date: Sat Oct 31 2026 - 13:06:02 EST


Hello,

This patchset fixes ops.enqueue/dispatch() calls for a cpu before the root's
ops.cpu_online(). Both ops are gated on SCX_RQ_ONLINE, which follows the
core's rq online state, and on a runtime cpu up the sched domain rebuild in
sched_cpu_activate() puts the rq online before scx_rq_activate() calls
ops.cpu_online().

0002 tracks the flag in handle_hotplug() instead, set right after
ops.cpu_online() and cleared when the cpu goes down. 0001 is preparation.

Based on sched_ext/for-7.4-fixes (0aba89317f38).

This patchset contains the following 2 patches.

0001 sched_ext: Factor out drain_offline_rq()
0002 sched_ext: Fix ops.enqueue/dispatch() calls before ops.cpu_online()

The patchset is also available in the following git branch:

git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git cpu-online-order

diffstat follows. Thanks.

kernel/sched/ext/ext.c | 93 ++++++++++++++++++++++++++--------------------
kernel/sched/ext/inlines.h | 2 +-
kernel/sched/ext/sub.c | 9 +++--
kernel/sched/sched.h | 17 +++++----
4 files changed, 68 insertions(+), 53 deletions(-)

--
tejun