The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2] sched/clock: print a log when the sched clock is marked unstable
@ 2021-07-07 10:56 Ani Sinha
  2021-07-07 11:17 ` Peter Zijlstra
  0 siblings, 1 reply; 5+ messages in thread
From: Ani Sinha @ 2021-07-07 10:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: anirban.sinha, tglx, Ani Sinha, Ingo Molnar, Peter Zijlstra,
	Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira

When the sched clock transitions from stable to unstable and
vice versa, a kernel log is printed. When the sched clock
is marked explicitly as unstable, make __clear_sched_clock_stable()
emit a warning log. It is useful for example in understanding
why a certain feature like NOHZ that depends on availability of a
stable sched clock, is not available.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 kernel/sched/clock.c | 1 +
 1 file changed, 1 insertion(+)

Changelog:
V1: original patch
v2: print pr_warn from __clear_sched_clock_stable instead. Commit log
    updated with proper prefix and wording.

diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
index c2b2859ddd82..99484fec0335 100644
--- a/kernel/sched/clock.c
+++ b/kernel/sched/clock.c
@@ -183,6 +183,7 @@ static void __clear_sched_clock_stable(void)
 		return;
 
 	tick_dep_set(TICK_DEP_BIT_CLOCK_UNSTABLE);
+	pr_warn("sched_clock: Marking unstable.\n");
 	schedule_work(&sched_clock_work);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-10  3:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-07 10:56 [PATCH v2] sched/clock: print a log when the sched clock is marked unstable Ani Sinha
2021-07-07 11:17 ` Peter Zijlstra
2021-07-07 11:45   ` Ani Sinha
2021-07-07 12:18     ` Ani Sinha
2021-07-10  3:49       ` Ani Sinha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox