[PATCHSET sched_ext/for-7.2] sched_ext: Auto-manage ext/fair dl_server bandwidth
From: Andrea Righi
Date: Thu May 21 2026 - 13:55:41 EST
Currently, a fixed bandwidth is reserved at boot for both the fair and ext
deadline servers, and this reservation remains unchanged unless explicitly
modified via debugfs. As a result, both reservations stay accounted in the root
domain's deadline bandwidth pool, regardless of whether a BPF scheduler is
active.
While unused bandwidth can still be reclaimed at runtime by other classes, this
static reservation prevents RT from fully utilizing available headroom in
situations where either the sched_ext or fair class is guaranteed to be inactive
(for example, when no BPF scheduler is loaded, or when sched_ext runs in full
mode and replaces fair).
As discussed at the VIII OSPM summit in Cambridge [1], a better solution would
be to dynamically register and unregister deadline server bandwidth based on the
active sched_ext state. This allows the kernel to automatically enable bandwidth
accounting only for the scheduling class that is currently active, while
disabling it for inactive ones.
This patch series implements this automatic register/unregister logic. Moreover,
the sched_ext total_bw kselftest is also modified to validate the correct
behavior across the different scheduling configurations and ensure that
bandwidth accounting follows the expected state transitions.
[1] https://retis.santannapisa.it/ospm-summit/
Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arighi/linux.git dl-server-bw
Andrea Righi (2):
sched_ext: Auto-register/unregister dl_server reservations
selftests/sched_ext: Validate dl_server attach/detach in total_bw test
include/linux/sched.h | 6 +
kernel/sched/deadline.c | 109 +++++++++++++++--
kernel/sched/ext.c | 43 +++++++
kernel/sched/sched.h | 2 +
tools/testing/selftests/sched_ext/total_bw.c | 171 ++++++++++++++++++++++++++-
5 files changed, 323 insertions(+), 8 deletions(-)