Michael, On Fri, 16 Nov 2018, Zhivich, Michael wrote: > On 11/15/18, 12:17 PM, "John Stultz" <john.stu...@linaro.org> wrote: > Would a more focused fix be to move the clocksource watchdog from a > normal timer to a hrtimer? > > That's an interesting idea - it would get clocksource watchdog out of > ksoftirqd. However, clocksource watchdog iterates over available CPUs to > check the TSC on each core (see add_timer_on() call in > clocksource_watchdog()). I'm not seeing an API to start an hrtimer on a > specific CPU - is this possible and I'm missing it? Or would something > like this have to be added to hrtimer?
It's surely an interesting idea, but it's not trivial. There is no way to reliably queue hrtimers remote when high resolution mode is enabled. It only works when the to be queued timer is not the first to expire one. If it ends up being the first to expire timer, then there is currently no way to rearm the remote per cpu clockevent device because it's not remotely accesible. It would need an SMP function call, but that needs to be asynchronous due to locking/interrupt disabled constraints. Maybe ... Thanks, tglx