LKML Archive on
help / color / mirror / Atom feed
From: Don Zickus <>
To: Andrew Morton <>
Cc: LKML <>,
	Ulrich Obergfell <>,
	Ingo Molnar <>
Subject: Re: [PATCH 7/9 UPDATE] watchdog: enable the new user interface of the watchdog mechanism
Date: Mon, 2 Mar 2015 14:05:14 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hi Andrew,

Not sure how you want this patch update based on your comments.  I attached
a patch to be folded into:


Let me know if you want me to fold changes into the original patch and
re-post or not.


From: Don Zickus <>
Date: Fri, 27 Feb 2015 16:14:11 -0500
Subject: [PATCH 1/2] watchdog: Update documentation for kernel params and sysctl

The nmi_watchdog and softlockup documentation was outdated and didn't
describe the effect of the current patchset correctly.  Update it
so others can understand how the knobs work and more importantly
what to expect when turning them.

Signed-off-by: Ulrich Obergfell <>
[wrote changelog -dcz]
Signed-off-by: Don Zickus <>

 Documentation/kernel-parameters.txt |    6 ++-
 Documentation/sysctl/kernel.txt     |   62 +++++++++++++++++++++++++++++-----
 2 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 6c37456..a502925 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2232,8 +2232,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 	nmi_watchdog=	[KNL,BUGS=X86] Debugging features for SMP kernels
 			Format: [panic,][nopanic,][num]
-			Valid num: 0
+			Valid num: 0 or 1
 			0 - turn nmi_watchdog off
+			1 - turn nmi_watchdog on
 			When panic is specified, panic when an NMI watchdog
 			timeout occurs (or 'nopanic' to override the opposite
@@ -2460,7 +2461,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 	nousb		[USB] Disable the USB subsystem
-	nowatchdog	[KNL] Disable the lockup detector (NMI watchdog).
+	nowatchdog	[KNL] Disable both lockup detectors, i.e.
+                        soft-lockup and NMI watchdog (hard-lockup).
 	nowb		[ARM]
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 83ab256..99d7eb3 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -77,12 +77,14 @@ show up in /proc/sys/kernel:
 - shmmax                      [ sysv ipc ]
 - shmmni
 - softlockup_all_cpu_backtrace
+- soft_watchdog
 - stop-a                      [ SPARC only ]
 - sysrq                       ==> Documentation/sysrq.txt
 - sysctl_writes_strict
 - tainted
 - threads-max
 - unknown_nmi_panic
+- watchdog
 - watchdog_thresh
 - version
@@ -417,16 +419,23 @@ successful IPC object allocation.
-Enables/Disables the NMI watchdog on x86 systems. When the value is
-non-zero the NMI watchdog is enabled and will continuously test all
-online cpus to determine whether or not they are still functioning
-properly. Currently, passing "nmi_watchdog=" parameter at boot time is
-required for this function to work.
+This parameter can be used to control the NMI watchdog
+(i.e. the hard lockup detector) on x86 systems.
-If LAPIC NMI watchdog method is in use (nmi_watchdog=2 kernel
-parameter), the NMI watchdog shares registers with oprofile. By
-disabling the NMI watchdog, oprofile may have more registers to
+   0 - disable the hard lockup detector
+   1 - enable the hard lockup detector
+The hard lockup detector monitors each CPU for its ability to respond to
+timer interrupts. The mechanism utilizes CPU performance counter registers
+that are programmed to generate Non-Maskable Interrupts (NMIs) periodically
+while a CPU is busy. Hence, the alternative name 'NMI watchdog'.
+The NMI watchdog is disabled by default if the kernel is running as a guest
+in a KVM virtual machine. This default can be overridden by adding
+   nmi_watchdog=1
+to the guest kernel command line (see Documentation/kernel-parameters.txt).
@@ -816,6 +825,22 @@ NMI.
+This parameter can be used to control the soft lockup detector.
+   0 - disable the soft lockup detector
+   1 - enable the soft lockup detector
+The soft lockup detector monitors CPUs for threads that are hogging the CPUs
+without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads
+from running. The mechanism depends on the CPUs ability to respond to timer
+interrupts which are needed for the 'watchdog/N' threads to be woken up by
+the watchdog timer function, otherwise the NMI watchdog - if enabled - can
+detect a hard lockup condition.
 Non-zero if the kernel has been tainted.  Numeric values, which
@@ -858,6 +883,25 @@ example.  If a system hangs up, try pressing the NMI switch.
+This parameter can be used to disable or enable the soft lockup detector
+_and_ the NMI watchdog (i.e. the hard lockup detector) at the same time.
+   0 - disable both lockup detectors
+   1 - enable both lockup detectors
+The soft lockup detector and the NMI watchdog can also be disabled or
+enabled individually, using the soft_watchdog and nmi_watchdog parameters.
+If the watchdog parameter is read, for example by executing
+   cat /proc/sys/kernel/watchdog
+the output of this command (0 or 1) shows the logical OR of soft_watchdog
+and nmi_watchdog.
 This value can be used to control the frequency of hrtimer and NMI

  parent reply	other threads:[~2015-03-02 19:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 20:40 [PATCH 0/9] watchdog: internally split softlockup and hardlockup Don Zickus
2015-02-05 20:40 ` [PATCH 1/9] watchdog: new definitions and variables, initialization Don Zickus
2015-02-05 20:40 ` [PATCH 2/9] watchdog: introduce the proc_watchdog_update() function Don Zickus
2015-02-05 20:40 ` [PATCH 3/9] watchdog: move definition of 'watchdog_proc_mutex' outside of proc_dowatchdog() Don Zickus
2015-02-05 20:40 ` [PATCH 4/9] watchdog: introduce the proc_watchdog_common() function Don Zickus
2015-02-05 20:40 ` [PATCH 5/9] watchdog: introduce separate handlers for parameters in /proc/sys/kernel Don Zickus
2015-02-05 20:40 ` [PATCH 6/9] watchdog: implement error handling for failure to set up hardware perf events Don Zickus
2015-02-23 21:17   ` Andrew Morton
2015-02-24 15:39     ` Don Zickus
2015-03-02 19:06     ` Don Zickus
2015-02-05 20:40 ` [PATCH 7/9] watchdog: enable the new user interface of the watchdog mechanism Don Zickus
2015-02-23 21:19   ` Andrew Morton
2015-02-24 15:46     ` Don Zickus
2015-03-02 19:05     ` Don Zickus [this message]
2015-02-05 20:40 ` [PATCH 8/9] watchdog: clean up some function names and arguments Don Zickus
2015-02-05 20:40 ` [PATCH 9/9] watchdog: introduce the hardlockup_detector_disable() function Don Zickus
2015-02-05 23:22 ` [PATCH 0/9] watchdog: internally split softlockup and hardlockup Andrew Morton
2015-02-06 14:12   ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH 7/9 UPDATE] watchdog: enable the new user interface of the watchdog mechanism' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).