]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit501c9b04ad772ede7865c03928ea903153b21d00
tree7e8b4c872ddf50905a188ea738a69e0f18a75bf4
parent010be30248bd8f46103aa0e3e990d5f484ca0729
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