Patch "powerpc/xmon: Avoid tripping SMP hardlockup watchdog" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/xmon: Avoid tripping SMP hardlockup watchdog
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-xmon-avoid-tripping-smp-hardlockup-watchdog.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 20 18:17:52 CET 2017
From: Nicholas Piggin <[email protected]>
Date: Fri, 29 Sep 2017 13:29:40 +1000
Subject: powerpc/xmon: Avoid tripping SMP hardlockup watchdog
From: Nicholas Piggin <[email protected]>
[ Upstream commit 064996d62a33ffe10264b5af5dca92d54f60f806 ]
The SMP hardlockup watchdog cross-checks other CPUs for lockups, which causes xmon headaches because it's assuming interrupts hard disabled means no watchdog troubles. Try to improve that by calling touch_nmi_watchdog() in obvious places where secondaries are spinning.
Also annotate these spin loops with spin_begin/end calls.
--- arch/powerpc/xmon/xmon.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
arch/powerpc/xmon/xmon.c +13 -4
@@ -530,14 +530,19 @@ static int xmon_core(struct pt_regs *reg waiting: secondary =1 ; +spin_begin ();while (secondary && !xmon_gate) {if (in_xmon ==0 ) { -if (fromipi) +if (fromipi) { +spin_end (); goto leave; + } secondary =test_and_set_bit (0 , &in_xmon); } -barrier (); +spin_cpu_relax (); +touch_nmi_watchdog (); } +spin_end ();if (!secondary && !xmon_gate) {/* we are the first cpu to come in */
@@ -568,21 +573,25 @@ static int xmon_core(struct pt_regs *regmb (); xmon_gate =1 ;barrier (); +touch_nmi_watchdog (); } cmdloop:while (in_xmon) {if (secondary) { +spin_begin ();if (cpu == xmon_owner) {if (!test_and_set_bit (0 , &xmon_taken)) { secondary =0 ; +spin_end ();continue ; }/* missed it */ while (cpu == xmon_owner) -barrier (); +spin_cpu_relax (); } -barrier (); +spin_cpu_relax (); +touch_nmi_watchdog (); }else { cmd =cmds (regs);if (cmd !=0 ) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/cpuidle-fix-broadcast-control-when-broadcast-can-not-be-entered.patch queue-4.14/powerpc-xmon-avoid-tripping-smp-hardlockup-watchdog.patch queue-4.14/powerpc-watchdog-do-not-trigger-smp-crash-from-touch_nmi_watchdog.patch