]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: Make watchdog reset lockless
authorThomas Gleixner <tglx@linutronix.de>
Mon, 12 Sep 2011 11:32:23 +0000 (13:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Sep 2011 07:58:29 +0000 (09:58 +0200)
commitdd9ec9b63787db4d5646611f2d5c8c6aa56a3f25
tree926cb7ca98eaacea06c8b951ee8b3a1330522c82
parente738634006b050caf36d0bcfe0ed9322e6dbf392
clocksource: Make watchdog reset lockless

KGDB needs to trylock watchdog_lock when trying to reset the
clocksource watchdog after the system has been stopped to avoid a
potential deadlock. When the trylock fails TSC usually becomes
unstable.

We can be more clever by using an atomic counter and checking it in
the clocksource_watchdog callback. We restart the watchdog whenever
the counter is > 0 and only decrement the counter when we ran through
a full update cycle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <johnstul@us.ibm.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1109121326280.2723@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/time/clocksource.c