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-next>] [day] [month] [year] [list]
Message-Id: <20210627064911.2179786-1-ani@anisinha.ca>
Date:   Sun, 27 Jun 2021 12:19:11 +0530
From:   Ani Sinha <ani@...sinha.ca>
To:     linux-kernel@...r.kernel.org
Cc:     anirban.sinha@...ia.com, tglx@...utronix.de,
        Ani Sinha <ani@...sinha.ca>, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: [PATCH v1] Print a log when the sched clock is marked unstable

In other parts of the kernel when the sched clock transitions from
stable to unstable and vice versa, a kernel info log is printed.
When the sched clock is marked explicitly as unstable, we should
print an information log as well. This patch addresses this. It is
useful in cases where for example, we want to understand why a
certain feature like NOHZ, which depends on a stable sched clock, is
not available.

Signed-off-by: Ani Sinha <ani@...sinha.ca>
---
 kernel/sched/clock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

See also thread
https://lkml.org/lkml/2021/6/20/32

diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
index c2b2859ddd82..5a403b2c9b3f 100644
--- a/kernel/sched/clock.c
+++ b/kernel/sched/clock.c
@@ -192,8 +192,10 @@ void clear_sched_clock_stable(void)
 
 	smp_mb(); /* matches sched_clock_init_late() */
 
-	if (static_key_count(&sched_clock_running.key) == 2)
+	if (static_key_count(&sched_clock_running.key) == 2) {
+		pr_info("sched_clock: Marking unstable.\n");
 		__clear_sched_clock_stable();
+	}
 }
 
 static void __sched_clock_gtod_offset(void)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ