]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clocksource: Print deviation in nanoseconds for unstable case
authorFeng Tang <feng.tang@intel.com>
Tue, 27 Apr 2021 04:14:30 +0000 (12:14 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 May 2021 00:07:15 +0000 (17:07 -0700)
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 existing delta in
nanoseconds to make it easier for humans to check the results.

[ paulmck: Fix typo. ]
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/time/clocksource.c

index bbe1bcf44ffa320515c807a9959c0043136191c0..4485635b69f5fd40d44efd2a79b38d64a8f77fc3 100644 (file)
@@ -406,10 +406,10 @@ static void clocksource_watchdog(struct timer_list *unused)
                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",
                                smp_processor_id(), cs->name);
-                       pr_warn("                      '%s' wd_now: %llx wd_last: %llx mask: %llx\n",
-                               watchdog->name, wdnow, wdlast, watchdog->mask);
-                       pr_warn("                      '%s' cs_now: %llx cs_last: %llx mask: %llx\n",
-                               cs->name, csnow, cslast, cs->mask);
+                       pr_warn("                      '%s' wd_nsec: %lld wd_now: %llx wd_last: %llx mask: %llx\n",
+                               watchdog->name, wd_nsec, wdnow, wdlast, watchdog->mask);
+                       pr_warn("                      '%s' cs_nsec: %lld cs_now: %llx cs_last: %llx mask: %llx\n",
+                               cs->name, cs_nsec, csnow, cslast, cs->mask);
                        if (curr_clocksource == cs)
                                pr_warn("                      '%s' is current clocksource.\n", cs->name);
                        else if (curr_clocksource)