Skip to contentSkip to conversation

watchdog: Disallow setting watchdog_thresh to -1

PATCH In review Li Zefan 3 participants 9 messages May 17, 2013 – May 28, 2013

Subsystems (2)
lore
Share & tools
lore
author
#1 lore raw

PATCH 2/3 watchdog: Document watchdog_thresh sysctl

In reply to Li Zefan
---
 Documentation/sysctl/kernel.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Documentation/sysctl/kernel.txt +14 -0
index ccd4258..e8fabd6 100644
@@ -76,6 +76,7 @@ show up in /proc/sys/kernel:
 - tainted
 - threads-max
 - unknown_nmi_panic
+- watchdog_thresh
 - version
 
 ==============================================================
@@ -648,3 +649,16 @@ that time, kernel debugging information is displayed on console.
 
 NMI switch that most IA32 servers have fires unknown NMI up, for
 example.  If a system hangs up, try pressing the NMI switch.
+
+==============================================================
+
+watchdog_thresh:
+
+This value can be used to control the frequency of hrtimer and NMI
+events and the soft and hard lockup thresholds. The default threshold
+is 10 seconds.
+
+The softlockup threshold is (2 * watchdog_thresh). Setting this
+tunable to zero will disable lockup detection altogether.
+
+==============================================================
Signature · 1 line
1.8.0.2
author
#4 lore raw

PATCH 3/3 watchdog: Remove softlockup_thresh from Documentation

In reply to Li Zefan

The old softlockup detector has been replaced with new lockup detector long ago.

---
 Documentation/sysctl/kernel.txt | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/sysctl/kernel.txt +0 -10
index e8fabd6..bcff3f9 100644
@@ -70,7 +70,6 @@ show up in /proc/sys/kernel:
 - shmall
 - shmmax                      [ sysv ipc ]
 - shmmni
-- softlockup_thresh
 - stop-a                      [ SPARC only ]
 - sysrq                       ==> Documentation/sysrq.txt
 - tainted
@@ -605,15 +604,6 @@ without users and with a dead originative process will be destroyed.
 
 ==============================================================
 
-softlockup_thresh:
-
-This value can be used to lower the softlockup tolerance threshold.  The
-default threshold is 60 seconds.  If a cpu is locked up for 60 seconds,
-the kernel complains.  Valid values are 1-60 seconds.  Setting this
-tunable to zero will disable the softlockup detection altogether.
-
-==============================================================
-
 tainted:
 
 Non-zero if the kernel has been tainted.  Numeric values, which
Signature · 1 line
1.8.0.2

Li Zefan

author
#0 lore raw

PATCH 1/3 watchdog: Disallow setting watchdog_thresh to -1

In old kernels, it's allowed to set softlockup_thresh to -1 or 0 to disable softlockup detection. However watchdog_thresh only uses 0 to disable detection, and setting it to -1 just froze my box and nothing I can do but reboot.

---
 kernel/sysctl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/sysctl.c +1 -2
index 9edcf45..b0a1f99 100644
@@ -120,7 +120,6 @@ extern int blk_iopoll_enabled;
 /* Constants used for minimum and  maximum */
 #ifdef CONFIG_LOCKUP_DETECTOR
 static int sixty = 60;
-static int neg_one = -1;
 #endif
 
 static int zero;
@@ -814,7 +813,7 @@ static struct ctl_table kern_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dowatchdog,
-		.extra1		= &neg_one,
+		.extra1		= &zero,
 		.extra2		= &sixty,
 	},
 	{
Signature · 1 line
1.8.0.2
Acked-by on v1 1/3
#7 lore raw
Quoted 6 lines · Li Zefan

In old kernels, it's allowed to set softlockup_thresh to -1 or 0 to disable softlockup detection. However watchdog_thresh only uses 0 to disable detection, and setting it to -1 just froze my box and nothing I can do but reboot.

Acked-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] watchdog: Document watchdog_thresh sysctl

In reply to Li Zefan
Quoted 2 lines · Li Zefan
Quoted 35 lines
---
 Documentation/sysctl/kernel.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Documentation/sysctl/kernel.txt +14 -0
index ccd4258..e8fabd6 100644
@@ -76,6 +76,7 @@ show up in /proc/sys/kernel:
 - tainted
 - threads-max
 - unknown_nmi_panic
+- watchdog_thresh
 - version
 
 ==============================================================
@@ -648,3 +649,16 @@ that time, kernel debugging information is displayed on console.
 
 NMI switch that most IA32 servers have fires unknown NMI up, for
 example.  If a system hangs up, try pressing the NMI switch.
+
+==============================================================
+
+watchdog_thresh:
+
+This value can be used to control the frequency of hrtimer and NMI
+events and the soft and hard lockup thresholds. The default threshold
+is 10 seconds.
+
+The softlockup threshold is (2 * watchdog_thresh). Setting this
+tunable to zero will disable lockup detection altogether.
+
+==============================================================
Signature · 1 line
1.8.0.2
Acked-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] watchdog: Remove softlockup_thresh from Documentation

In reply to Li Zefan
Quoted 4 lines · Li Zefan

The old softlockup detector has been replaced with new lockup detector long ago.

Quoted 34 lines
---
 Documentation/sysctl/kernel.txt | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/sysctl/kernel.txt +0 -10
index e8fabd6..bcff3f9 100644
@@ -70,7 +70,6 @@ show up in /proc/sys/kernel:
 - shmall
 - shmmax                      [ sysv ipc ]
 - shmmni
-- softlockup_thresh
 - stop-a                      [ SPARC only ]
 - sysrq                       ==> Documentation/sysrq.txt
 - tainted
@@ -605,15 +604,6 @@ without users and with a dead originative process will be destroyed.
 
 ==============================================================
 
-softlockup_thresh:
-
-This value can be used to lower the softlockup tolerance threshold.  The
-default threshold is 60 seconds.  If a cpu is locked up for 60 seconds,
-the kernel complains.  Valid values are 1-60 seconds.  Setting this
-tunable to zero will disable the softlockup detection altogether.
-
-==============================================================
-
 tainted:
 
 Non-zero if the kernel has been tainted.  Numeric values, which
Signature · 1 line
1.8.0.2
#8 lore raw
In reply to Li Zefan
watchdog: Disallow setting watchdog_thresh to -1
Commit-ID:  a6572f84c5b135d9b6df279ed3c8de028bd1edd9
Gitweb:     http://git.kernel.org/tip/a6572f84c5b135d9b6df279ed3c8de028bd1edd9
Author:     Li Zefan <[email protected]>
AuthorDate: Fri, 17 May 2013 10:31:04 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 28 May 2013 11:28:18 +0200

watchdog: Disallow setting watchdog_thresh to -1

In old kernels, it's allowed to set softlockup_thresh to -1 or 0 to disable softlockup detection. However watchdog_thresh only uses 0 to disable detection, and setting it to -1 just froze my box and nothing I can do but reboot.

---
 kernel/sysctl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/sysctl.c +1 -2
index 9edcf45..b0a1f99 100644
@@ -120,7 +120,6 @@ extern int blk_iopoll_enabled;
 /* Constants used for minimum and  maximum */
 #ifdef CONFIG_LOCKUP_DETECTOR
 static int sixty = 60;
-static int neg_one = -1;
 #endif
 
 static int zero;
@@ -814,7 +813,7 @@ static struct ctl_table kern_table[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dowatchdog,
-		.extra1		= &neg_one,
+		.extra1		= &zero,
 		.extra2		= &sixty,
 	},
 	{
#3 lore raw

[tip:perf/core] watchdog: Document watchdog_thresh sysctl

In reply to Li Zefan
watchdog: Document watchdog_thresh sysctl
Commit-ID:  08825c90af6e4bb902b3a51abb0ae6530199f682
Gitweb:     http://git.kernel.org/tip/08825c90af6e4bb902b3a51abb0ae6530199f682
Author:     Li Zefan <[email protected]>
AuthorDate: Fri, 17 May 2013 10:31:20 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 28 May 2013 11:28:19 +0200

watchdog: Document watchdog_thresh sysctl

---
 Documentation/sysctl/kernel.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Documentation/sysctl/kernel.txt +14 -0
index ccd4258..e8fabd6 100644
@@ -76,6 +76,7 @@ show up in /proc/sys/kernel:
 - tainted
 - threads-max
 - unknown_nmi_panic
+- watchdog_thresh
 - version
 
 ==============================================================
@@ -648,3 +649,16 @@ that time, kernel debugging information is displayed on console.
 
 NMI switch that most IA32 servers have fires unknown NMI up, for
 example.  If a system hangs up, try pressing the NMI switch.
+
+==============================================================
+
+watchdog_thresh:
+
+This value can be used to control the frequency of hrtimer and NMI
+events and the soft and hard lockup thresholds. The default threshold
+is 10 seconds.
+
+The softlockup threshold is (2 * watchdog_thresh). Setting this
+tunable to zero will disable lockup detection altogether.
+
+==============================================================
#6 lore raw

[tip:perf/core] watchdog: Remove softlockup_thresh from Documentation

In reply to Li Zefan
watchdog: Remove softlockup_thresh from Documentation
Commit-ID:  c0ffaf3655fab1909a920c8f30ba1722932d01bb
Gitweb:     http://git.kernel.org/tip/c0ffaf3655fab1909a920c8f30ba1722932d01bb
Author:     Li Zefan <[email protected]>
AuthorDate: Fri, 17 May 2013 10:31:35 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 28 May 2013 11:28:20 +0200

watchdog: Remove softlockup_thresh from Documentation

The old softlockup detector has been replaced with new lockup detector long ago.

---
 Documentation/sysctl/kernel.txt | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/sysctl/kernel.txt +0 -10
index e8fabd6..bcff3f9 100644
@@ -70,7 +70,6 @@ show up in /proc/sys/kernel:
 - shmall
 - shmmax                      [ sysv ipc ]
 - shmmni
-- softlockup_thresh
 - stop-a                      [ SPARC only ]
 - sysrq                       ==> Documentation/sysrq.txt
 - tainted
@@ -605,15 +604,6 @@ without users and with a dead originative process will be destroyed.
 
 ==============================================================
 
-softlockup_thresh:
-
-This value can be used to lower the softlockup tolerance threshold.  The
-default threshold is 60 seconds.  If a cpu is locked up for 60 seconds,
-the kernel complains.  Valid values are 1-60 seconds.  Setting this
-tunable to zero will disable the softlockup detection altogether.
-
-==============================================================
-
 tainted:
 
 Non-zero if the kernel has been tainted.  Numeric values, which