]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sysrq: Reset the watchdog timers while displaying high-resolution timers
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 4 Jan 2017 22:28:04 +0000 (15:28 -0700)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:44 +0000 (21:33 -0400)
commitf33ee21dc45043e3053a4d516bddc984b104a474
treed178c5b5a2238fea44b2938cdbf5ce101cb9249d
parent2b24be15444aef66f1c8340b8300e37c8b2456e9
sysrq: Reset the watchdog timers while displaying high-resolution timers

[ Upstream commit 0107042768658fea9f5f5a9c00b1c90f5dab6a06 ]

On systems with a large number of CPUs, running sysrq-<q> can cause
watchdog timeouts.  There are two slow sections of code in the sysrq-<q>
path in timer_list.c.

1. print_active_timers() - This function is called by print_cpu() and
   contains a slow goto loop.  On a machine with hundreds of CPUs, this
   loop took approximately 100ms for the first CPU in a NUMA node.
   (Subsequent CPUs in the same node ran much quicker.)  The total time
   to print all of the CPUs is ultimately long enough to trigger the
   soft lockup watchdog.

2. print_tickdevice() - This function outputs a large amount of textual
   information.  This function also took approximately 100ms per CPU.

Since sysrq-<q> is not a performance critical path, there should be no
harm in touching the nmi watchdog in both slow sections above.  Touching
it in just one location was insufficient on systems with hundreds of
CPUs as occasional timeouts were still observed during testing.

This issue was observed on an Oracle T7 machine with 128 CPUs, but I
anticipate it may affect other systems with similarly large numbers of
CPUs.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
kernel/time/timer_list.c