[GIT PULL] sched_ext: Fixes for v7.3-rc4

From: Tejun Heo

Date: Thu Sep 24 2026 - 17:20:02 EST


Hello,

The following changes since commit a9e3760b0838299649c0d57cca44daaf40ba3c33:

sched_ext: Maintain an online cid mask in the scheduler arena (2026-09-15 06:57:20 -1000)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git tags/sched_ext-for-7.3-rc4-fixes

for you to fetch changes up to 4409a85735cdca5c4c400c0dad1feee091872eee:

sched_ext: Count SCX_EV_SUB_BYPASS_DISPATCH in the dispatch fallback (2026-09-23 08:16:10 -1000)

----------------------------------------------------------------
sched_ext: Fixes for v7.3-rc4

- A task reenqueued while its dispatch was still completing had its queued
state clobbered by the dispatcher, dropping every later dispatch of the
task. Wait for the in-flight dispatch to settle first.

- A wakeup activation on another CPU marked the destination runqueue as
mid-wakeup, stranding a pending local reenqueue. If the scheduler was
unloaded first, the stale request pointed into freed memory that the next
scheduler dereferenced.

- ops.dequeue() ran with the source dispatch queue's lock held, so a
scheduler iterating that queue from the callback deadlocked the CPU.

- Schedulers with their own CPU ID mapping had no way to learn a task's
initial CPU mask and rebuilt it themselves, which went wrong across
sub-scheduler enable and re-home. Pass it to ops.enable().

- A bypass dispatch event counter missed the dispatches made by the
end-of-dispatch fallback and under-reported.

- Selftests for the dequeue locking and initial mask changes.

----------------------------------------------------------------
Liang Luo (1):
sched_ext: Count SCX_EV_SUB_BYPASS_DISPATCH in the dispatch fallback

Tejun Heo (4):
sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a task
sched_ext: Derive SCX_RQ_IN_WAKEUP from the core enqueue flags
sched_ext: Pass the initial cmask to cid-form ops.enable()
selftests/sched_ext: Check the cmask cid-form ops.enable() receives

fangqiurong (2):
sched_ext: Don't run ops.dequeue() with a DSQ lock held
selftests/sched_ext: Test that ops.dequeue() can iterate the consumed DSQ

kernel/sched/ext/ext.c | 156 ++++++++++-----
kernel/sched/ext/inlines.h | 4 +-
kernel/sched/ext/internal.h | 60 +++++-
kernel/sched/ext/sub.c | 11 +-
tools/sched_ext/scx_qmap.bpf.c | 3 -
tools/testing/selftests/sched_ext/Makefile | 2 +
.../testing/selftests/sched_ext/dequeue_iter.bpf.c | 73 +++++++
tools/testing/selftests/sched_ext/dequeue_iter.c | 79 ++++++++
.../testing/selftests/sched_ext/enable_cmask.bpf.c | 217 +++++++++++++++++++++
tools/testing/selftests/sched_ext/enable_cmask.c | 138 +++++++++++++
10 files changed, 671 insertions(+), 72 deletions(-)
create mode 100644 tools/testing/selftests/sched_ext/dequeue_iter.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/dequeue_iter.c
create mode 100644 tools/testing/selftests/sched_ext/enable_cmask.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/enable_cmask.c

--
tejun