provide a sched-ext enabled kernel for the 24.10 release
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
linux (Ubuntu) | Status tracked in Oracular | |||||
Oracular |
New
|
Undecided
|
Unassigned |
Bug Description
[Impact]
sched-ext is a new scheduling class introduced in the Linux kernel that provides a mechanism to implement scheduling policies as eBPF programs (https:/
The idea of "pluggable" schedulers is not new, it was initially proposed in 2004 (https:/
However, with BPF and the sched-ext scheduling class, we now have the possibility to easily and quickly implement and test scheduling policies, making the “pluggable” approach an effective tool for easy experimentation.
The ability to implement custom scheduling policies via BPF greatly lowers the difficulty of testing new scheduling ideas (much easier than changing CFS or replacing it with a different scheduler). With this feature researchers or developers can test their own scheduler in a safe way, without even needing to reboot the system.
Shipping this feature in the Ubuntu kernel can provide a significant benefit to researchers and companies that want to experiment (or ship) their own scheduling policy, implemented as an eBPF/user-space program.
Targeting linux-unstable only for now is probably a good compromise to allow users to start some experiments, collect feedbacks, help the upstream community to find and fix bugs and at the same time avoid to introduce too much maintenance burden on us.
[Test case]
Basic test cases for this feature are provided by the sched-ext patch set. Tests and custom scheduler implementations are available in tools/sched_ext or in https:/
[Fix]
Apply this patch set as SAUCE to linux-unstable:
https://<email address hidden>/T/
On top of the patch set we want to apply also the following patches (still as SAUCE):
- UBUNTU: SAUCE: sched_ext: use proper atomic operator for scx.ops_state
(extra fix to properly build sched-ext on armhf)
- UBUNTU: SAUCE: sched-ext: taint kernel when a custom scheduler is loaded
(set TAINT_OOT_MODULE in /proc/sys/
- UBUNTU: [Config] enable sched_ext in annotations
(enable sched-ext in the config across all the supported architectures)
Soon there will be a branch against any kernel that we need here (we will only need 6.7 for now):
https:/
[Regression potential]
This feature is not going to be merged upstream in the near future, some upstream maintainers are worried that giving the possibility to inject in the kernel a custom scheduler can introduce performance regressions that are hard to track down.
For this reason we should apply this feature only to linux-unstable for now, making sure that the patch is unapplied or reverted when linux-unstable becomes linux.
In the meantime we can also figure out a reasonable way to determine when a custom scheduler is used (i.e., taint the kernel?) to easily determine when any potential performance regression may have been introduced by a custom sched-ext scheduler.
From a maintenance perspective, having this patch set applied may also be problematic (potential conflicts) when we apply new stable updates. However, the upstream maintainers of sched-ext have expressed interest to help us maintaining the patch set against the target kernel(s) that we need. And targeting linux-unstable only can definitely mitigate the maintenance problem a lot (since we won't have the urgency to apply critical security fixes to linux-unstable).
summary: |
- apply sched-ext patch set to inux-unstable + apply sched-ext patch set to linux-unstable |
description: | updated |
description: | updated |
summary: |
- apply sched-ext patch set to linux-unstable + provide a sched-ext enabled kernel for the 24.10 release |
no longer affects: | linux (Ubuntu Noble) |