Commit 22a22383 authored by Feng Tang's avatar Feng Tang Committed by Thomas Gleixner

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: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210527190124.440372-6-paulmck@kernel.org
parent 1253b9b8
...@@ -407,10 +407,10 @@ static void clocksource_watchdog(struct timer_list *unused) ...@@ -407,10 +407,10 @@ static void clocksource_watchdog(struct timer_list *unused)
if (abs(cs_nsec - wd_nsec) > md) { if (abs(cs_nsec - wd_nsec) > md) {
pr_warn("timekeeping watchdog on CPU%d: Marking clocksource '%s' as unstable because the skew is too large:\n", pr_warn("timekeeping watchdog on CPU%d: Marking clocksource '%s' as unstable because the skew is too large:\n",
smp_processor_id(), cs->name); smp_processor_id(), cs->name);
pr_warn(" '%s' wd_now: %llx wd_last: %llx mask: %llx\n", pr_warn(" '%s' wd_nsec: %lld wd_now: %llx wd_last: %llx mask: %llx\n",
watchdog->name, wdnow, wdlast, watchdog->mask); watchdog->name, wd_nsec, wdnow, wdlast, watchdog->mask);
pr_warn(" '%s' cs_now: %llx cs_last: %llx mask: %llx\n", pr_warn(" '%s' cs_nsec: %lld cs_now: %llx cs_last: %llx mask: %llx\n",
cs->name, csnow, cslast, cs->mask); cs->name, cs_nsec, csnow, cslast, cs->mask);
if (curr_clocksource == cs) if (curr_clocksource == cs)
pr_warn(" '%s' is current clocksource.\n", cs->name); pr_warn(" '%s' is current clocksource.\n", cs->name);
else if (curr_clocksource) else if (curr_clocksource)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment