Skip to content

Commit 22a2238

Browse files
ftang1KAGA-KOKO
authored andcommitted
clocksource: Print deviation in nanoseconds when a clocksource becomes unstable
Currently when an unstable clocksource is detected, the raw counters of that clocksource and watchdog will be printed, which can only be understood after some math calculation. So print the delta in nanoseconds as well to make it easier for humans to check the results. [ paulmck: Fix typo. ] Signed-off-by: Feng Tang <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1253b9b commit 22a2238

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/time/clocksource.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,10 @@ static void clocksource_watchdog(struct timer_list *unused)
407407
if (abs(cs_nsec - wd_nsec) > md) {
408408
pr_warn("timekeeping watchdog on CPU%d: Marking clocksource '%s' as unstable because the skew is too large:\n",
409409
smp_processor_id(), cs->name);
410-
pr_warn(" '%s' wd_now: %llx wd_last: %llx mask: %llx\n",
411-
watchdog->name, wdnow, wdlast, watchdog->mask);
412-
pr_warn(" '%s' cs_now: %llx cs_last: %llx mask: %llx\n",
413-
cs->name, csnow, cslast, cs->mask);
410+
pr_warn(" '%s' wd_nsec: %lld wd_now: %llx wd_last: %llx mask: %llx\n",
411+
watchdog->name, wd_nsec, wdnow, wdlast, watchdog->mask);
412+
pr_warn(" '%s' cs_nsec: %lld cs_now: %llx cs_last: %llx mask: %llx\n",
413+
cs->name, cs_nsec, csnow, cslast, cs->mask);
414414
if (curr_clocksource == cs)
415415
pr_warn(" '%s' is current clocksource.\n", cs->name);
416416
else if (curr_clocksource)

0 commit comments

Comments
 (0)