Re: [PATCH v10 clocksource 6/7] clocksource: Forgive tsc_early pre-calibration drift

From: Thomas Gleixner
Date: Mon Apr 26 2021 - 11:28:42 EST


On Mon, Apr 26 2021 at 23:01, Feng Tang wrote:
> On Sun, Apr 25, 2021 at 03:47:07PM -0700, Paul E. McKenney wrote:
> We've reported one case that tsc can be wrongly judged as 'unstable'
> by 'refined-jiffies' watchdog [1], while reducing the threshold could
> make it easier to be triggered.
>
> It could be reproduced on the a plaform with a 115200 serial console,
> and hpet been disabled (several x86 platforms has this), add
> 'initcall_debug' cmdline parameter to get more debug message, we can
> see:
>
> [ 1.134197] clocksource: timekeeping watchdog on CPU1: Marking clocksource 'tsc-early' as unstable because the skew is too large:
> [ 1.134214] clocksource: 'refined-jiffies' wd_nesc: 500000000 wd_now: ffff8b35 wd_last: ffff8b03 mask: ffffffff
> [ 1.134217] clocksource: 'tsc-early' cs_nsec: 507537855 cs_now: 4e63c9d09 cs_last: 4bebd81f5 mask: ffffffffffffffff
> [ 1.134220] clocksource: No current clocksource.
> [ 1.134222] tsc: Marking TSC unstable due to clocksource watchdog

Yes, refined jiffies is the worst case.

Though the worst of everything is that any of this exists at all, but
you knew that already :)

Thanks,

tglx