[PATCH 00/14] sched: Support shared runqueue locking

Peter Zijlstra
2025-09-10T16:00:38Z

Hi,

As mentioned [1], a fair amount of sched ext weirdness (current and proposed)
is down to the core code not quite working right for shared runqueue stuff.

Instead of endlessly hacking around that, bite the bullet and fix it all up.

With these patches, it should be possible to clean up pick_task_scx() to not
rely on balance_scx(). Additionally it should be possible to fix that RT issue,
and the dl_server issue without further propagating lock breaks.

As is, these patches boot and run/pass selftests/sched_ext with lockdep on.

I meant to do more sched_ext cleanups, but since this has all already taken
longer than I would've liked (real life interrupted :/), I figured I should
post this as is and let TJ/Andrea poke at it.

Patches are also available at:

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/cleanup

[1] https://lkml.kernel.org/r/20250904202858.GN4068168@noisy.programming.kicks-ass.net

---
include/linux/cleanup.h | 5 +
include/linux/sched.h | 6 +-
kernel/cgroup/cpuset.c | 2 +-
kernel/kthread.c | 15 +-
kernel/sched/core.c | 370 +++++++++++++++++++++--------------------------
kernel/sched/deadline.c | 26 ++--
kernel/sched/ext.c | 104 +++++++------
kernel/sched/fair.c | 23 ++-
kernel/sched/idle.c | 14 +-
kernel/sched/rt.c | 13 +-
kernel/sched/sched.h | 225 ++++++++++++++++++++--------
kernel/sched/stats.h | 2 +-
kernel/sched/stop_task.c | 14 +-
kernel/sched/syscalls.c | 80 ++++------
14 files changed, 495 insertions(+), 404 deletions(-)