sched_ext: Fixes for v7.3-rc4
Tejun Heo
reviewerHello,
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
Signature · 1 line
tejun
The pull request you sent on Thu, 24 Sep 2026 11:19:47 -1000:
The pull request you sent on Thu, 24 Sep 2026 11:19:47 -1000:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git tags/sched_ext-for-7.3-rc4-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ee9c669f9bf5fd2c24206746ded9382fe810df89
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html