Skip to contentSkip to conversation

Time/clocksource:The clock source was misjudged as unstable

RFC yanghui 1 participant 1 message Aug 19, 2021

lore
Share & tools
lore

yanghui

author
#0 lore raw

We use clocksource_watchdog() to monitor whether the current clocksource is stable every WATCHDOG_INTERVAL. But clocksource_watchdog() can't be schedule in time when current CPU occurs Softlockup. This will bring following clocksource misjudgment problem:

if the clocksource_watchdog() schedule time longer then WATCHDOG_INTERVAL, the value of abs(cs_nsec - wd_nsec) will be enlarged a lot, but both of the clocksource is normal at this time. And if the value is bigger than md, system will misjudge that current clocksource is unstable then to select another clocksource.

So we think this is a situation that Softlockup causes the clocksource to be misjudged. We want to know is there have some good idea to solve this problem ? Actually we want to use hrtimer to replace normal timer. But hrtimer is difficult to execute in turn on each CPU when the system is just boot up. Is there a better way to solve this problem ?

Thanks

---

Signature · 1 line
2.20.1