[lkml]   [2015]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH 7/9 UPDATE] watchdog: enable the new user interface of the watchdog mechanism
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

 \ /
  Last update: 2015-03-02 20:21    [W:0.199 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site