lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109031959.2786873-2-atomlin@atomlin.com>
Date: Thu,  8 Jan 2026 22:19:59 -0500
From: Aaron Tomlin <atomlin@...mlin.com>
To: mingo@...hat.com,
	peterz@...radead.org,
	juri.lelli@...hat.com,
	vincent.guittot@...aro.org,
	dietmar.eggemann@....com,
	rostedt@...dmis.org,
	bsegall@...gle.com,
	mgorman@...e.de,
	vschneid@...hat.com
Cc: sshegde@...ux.ibm.com,
	neelx@...e.com,
	sean@...e.io,
	mproche@...il.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] sched/deadline: Log Fair Server re-enablement for symmetry with debugfs

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@...mlin.com>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ