]> 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)
commit1111f8f209dad20dc2e1d7edfe4c82125bc37872
tree7e8b4c872ddf50905a188ea738a69e0f18a75bf4
parent88b6e7d2d492363b887e9acce2f415dfed09dd1b
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