VOOZH about

URL: https://www.phoronix.com/news/Linux-6.18-sched-ext

⇱ Linux 6.18 sched_ext Preps For Cgroup Sub-Scheduler Support - Phoronix


👁 Phoronix

Linux 6.18 sched_ext Preps For Cgroup Sub-Scheduler Support

Written by Michael Larabel in Linux Kernel on 27 September 2025 at 06:05 AM EDT. 5 Comments
The sched_ext scheduler framework that allows creating kernel thread schedulers via BPF programs is ready with some updates for the Linux 6.18 kernel.

Sched_ext for Linux 6.18 is bringing code cleanups, new helpers, some debugging enhancements, and a variety of other improvements.

Also standing out with this sched_ext pull is preparations for cgroup sub-scheduler support.
- Code organization cleanup. Separate internal types and accessors to ext_internal.h to reduce the size of ext.c and improve maintainability.

- Prepare for cgroup sub-scheduler support by adding @sch parameter to various functions and helpers, reorganizing scheduler instance handling, and dropping obsolete helpers like scx_kf_exit() and kf_cpu_valid().

- Add new scx_bpf_cpu_curr() and scx_bpf_locked_rq() BPF helpers to provide safer access patterns with proper RCU protection. scx_bpf_cpu_rq() is deprecated with warnings due to potential race conditions.

- Improve debugging with migration-disabled counter in error state dumps, SCX_EFLAG_INITIALIZED flag, bitfields for warning flags, and other enhancements to help diagnose issues.

- Use cgroup_lock/unlock() for cgroup synchronization instead of scx_cgroup_rwsem based synchronization. This is simpler and allows enable/disable paths to synchronize against cgroup changes independent of the CPU controller.

- rhashtable_lookup() replacement to avoid redundant RCU locking was reverted due to RCU usage warnings. Will be redone once rhashtable is updated to use rcu_dereference_all().

- Other misc updates and fixes including bypass handling improvements, scx_task_iter_relock() improvements, tools/sched_ext updates, and compatibility helpers.

More details on these sched_ext changes prepped for the Linux 6.18 merge window via this pull request.

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.