Skip to content

sched_ext: Backport dispatch and task-state fixes

Andrea Righi sched-ext stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8sched_ext: Check remote rq eligibility under task's rq lockkernel/sched/ext.c kernel/sched/ext_internal.h+29 -180 replies
2/8sched_ext: Don't run ops.dequeue() with a DSQ lock heldkernel/sched/ext.c+26 -220 replies
3/8sched_ext: Call ops.dequeue() when a task arrives on a remote local DSQkernel/sched/ext.c+7 -30 replies
4/8sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a taskkernel/sched/ext.c+10 -00 replies
5/8sched_ext: Wait for SCX_OPSS_DISPATCHING before moving tasks off DSQskernel/sched/ext.c+12 -20 replies
6/8sched_ext: Generate qseq from a per-task counterinclude/linux/sched/ext.h kernel/sched/ext.c kernel/sched/ext_internal.h +1 more+16 -60 replies
7/8sched_ext: Reset dsq_vtime and slice when a task leaves SCXkernel/sched/ext.c+7 -00 replies
8/8sched_ext: Reset task fields on exit of an SCX_TASK_READY taskkernel/sched/ext.c+2 -00 replies

Reviews trailers per patch

5 of 8 patches have a Reviewed-by or Acked-by.

PatchAndrea Righi
1/8R-b
2/8A-b
3/8R-b
4/8R-b
5/8R-b
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 7.1.y 0/8] sched_ext: Backport dispatch and task-state fixes

Backport sched_ext ops.dequeue() and stale task state fixes.

These fixes correct ops.dequeue() callback behavior, synchronize dispatch state and reset task fields when leaving SCX. These core fixes allow schedulers that rely on the kernel's task lifecycle guarantees (e.g., scx_bpfland) to operate correctly.

- Patches 1-6 use the older, unsplit sources and static DSQ helpers. Reuse the 7.2 backports where applicable, keeping the existing wakeup flag handling and dump helpers instead of pulling in later refactors.
- Patch 7 targets the older kernel/sched/ext.c disable path.
- Patch 8 resets the fields directly in the READY exit path because 7.1 lacks scx_reset_task_fields().

Tested with CONFIG_SCHED_CLASS_EXT=y and CONFIG_PROVE_LOCKING=y. All 30 sched_ext tests passed, including a task-field reset regression test. scx_bpfland also passed load/unload testing under CPU load.

Andrea Righi (1):
sched_ext: Reset dsq_vtime and slice when a task leaves SCX

Kuba Piecuch (4):
sched_ext: Check remote rq eligibility under task's rq lock
sched_ext: Call ops.dequeue() when a task arrives on a remote local
DSQ
sched_ext: Wait for SCX_OPSS_DISPATCHING before moving tasks off DSQs
sched_ext: Generate qseq from a per-task counter

Rahad Bhuiya (1):
sched_ext: Reset task fields on exit of an SCX_TASK_READY task

Tejun Heo (1):
sched_ext: Wait for SCX_OPSS_DISPATCHING before reenqueueing a task

fangqiurong (1):
sched_ext: Don't run ops.dequeue() with a DSQ lock held

 include/linux/sched/ext.h   |   1 +
 kernel/sched/ext.c          | 130 +++++++++++++++++++++++++-----------
 kernel/sched/ext_internal.h |  28 +++++---
 kernel/sched/sched.h        |   1 -
 4 files changed, 109 insertions(+), 51 deletions(-)

base-commit: 81d3924095fd017e473332a9b6dd6dd0e3d9a59b

Signature · 1 line
2.56.1