[PATCH 1/1] sched/deadline: Log Fair Server re-enablement for symmetry with debugfs

From: Aaron Tomlin
Date: Thu Jan 08 2026 - 22:22:30 EST


Currently, the scheduler's debug interface emits a notification to the
console when the Fair Server is explicitly disabled via the fair_server
sysfs attribute. However, no corresponding log entry is generated when
the server is subsequently re-enabled.

This omission results in an asymmetry within the kernel logs,
potentially obscuring the true operational state of the scheduler during
debugging or performance analysis.

This patch amends dl_server_apply_params() to introduce the requisite
logging. By detecting the transition from zero to non-zero
bandwidth - strictly for the Fair Server entity and excluding
initialisation - we ensure that a "Fair server re-enabled" message is
emitted. This restores logging symmetry and provides administrators with
a clear audit trail of manual runtime adjustments.

Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
---
kernel/sched/deadline.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 319439fe1870..e64fb988e957 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1867,6 +1867,7 @@ int dl_server_apply_params(struct sched_dl_entity *dl_se, u64 runtime, u64 perio
u64 old_bw = init ? 0 : to_ratio(dl_se->dl_period, dl_se->dl_runtime);
u64 new_bw = to_ratio(period, runtime);
struct rq *rq = dl_se->rq;
+ bool fair_server = dl_se == &rq->fair_server;
int cpu = cpu_of(rq);
struct dl_bw *dl_b;
unsigned long cap;
@@ -1876,6 +1877,11 @@ int dl_server_apply_params(struct sched_dl_entity *dl_se, u64 runtime, u64 perio
dl_b = dl_bw_of(cpu);
guard(raw_spinlock)(&dl_b->lock);

+ /* Symmetric to disable message in sched_fair_server_write() */
+ if (!init && fair_server && !old_bw && new_bw)
+ printk_deferred("Fair server re-enabled on CPU %d.\n",
+ cpu);
+
cpus = dl_bw_cpus(cpu);
cap = dl_bw_capacity(cpu);

--
2.51.0