powerpc/watchdog: Moderate touch_nmi_watchdog overhead
authorNicholas Piggin <npiggin@gmail.com>
Wed, 9 Aug 2017 12:41:23 +0000 (22:41 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 9 Aug 2017 13:45:29 +0000 (23:45 +1000)
commit26c5c6e129ee725f103938262a034861ada467ae
tree7e8b4c872ddf50905a188ea738a69e0f18a75bf4
parentd8e2a4053574002135fbb032c2e74f1d1dbb2103
powerpc/watchdog: Moderate touch_nmi_watchdog overhead

Some code can go into a tight loop calling touch_nmi_watchdog (e.g.,
stop_machine CPU hotplug code). This can cause contention on watchdog
locks particularly if all CPUs with watchdog enabled are spinning in
the loops.

Avoid this storm of activity by running the watchdog timer callback
from this path if we have exceeded the timer period since it was last
run.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/watchdog.c