[Devel] [PATCH RHEL7 COMMIT] ms/kernel/sysrq: restore touch_nmi_watchdog() in show_state_filter()

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 15 01:41:37 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.14
------>
commit 3eada65cb70c5f2c773fcac7aabc72de5f768bac
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Wed Jun 15 12:41:37 2016 +0400

    ms/kernel/sysrq: restore touch_nmi_watchdog() in show_state_filter()
    
    Commit 60c21d9f08bf ("kernel/sysrq: reset watchdog on all cpus while during sysrq-w")
    shouldn't remove touch_nmi_watchdog() call because touch_all_softlockup_watchdogs()
    resets only softlockup watchdogs, but doesn't reset NMI watchdog used in hard lockup
    detector.
    
    So, bring it back. Plus, remove the second touch_all_softlockup_watchdogs() call
    which becomes redundant, and add a comment.
    
    This patch is delta between v2-v1 version of the upstream patch:
    	http://lkml.kernel.org/g/1465474805-14641-1-git-send-email-aryabinin@virtuozzo.com
    
    https://jira.sw.ru/browse/PSBM-47486
    
    Fixes: 60c21d9f08bf ("kernel/sysrq: reset watchdog on all cpus while during sysrq-w")
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 kernel/sched/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d21ccf0..1a3ff8c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5176,14 +5176,16 @@ void show_state_filter(unsigned long state_filter)
 		/*
 		 * reset the NMI-timeout, listing all files on a slow
 		 * console might take a lot of time:
+		 * Also, reset softlockup watchdogs on all CPUs, because
+		 * another CPU might be blocked waiting for us to process
+		 * an IPI.
 		 */
+		touch_nmi_watchdog();
 		touch_all_softlockup_watchdogs();
 		if (!state_filter || (p->state & state_filter))
 			sched_show_task(p);
 	} while_each_thread(g, p);
 
-	touch_all_softlockup_watchdogs();
-
 #if 0
 	/*
 	 * This results in soft lockups, because it writes too much data to


More information about the Devel mailing list