softlockup: add a /proc tuning parameter
Control the trigger limit for softlockup warnings. This is useful for debugging softlockups, by lowering the softlockup_thresh to identify possible softlockups earlier. This patch: 1. Adds a sysctl softlockup_thresh with valid values of 1-60s (Higher value to disable false positives) 2. Changes the softlockup printk to print the cpu softlockup time [akpm@linux-foundation.org: Fix various warnings and add definition of "two"] Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Shai Fultheim <shai@scalex86.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
a5f2ce3c60
commit
c4f3b63fe1
@@ -80,6 +80,19 @@ extern int maps_protect;
|
||||
extern int sysctl_stat_interval;
|
||||
extern int audit_argv_kb;
|
||||
|
||||
/* Constants used for minimum and maximum */
|
||||
#ifdef CONFIG_DETECT_SOFTLOCKUP
|
||||
static int one = 1;
|
||||
static int sixty = 60;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
static int two = 2;
|
||||
#endif
|
||||
|
||||
static int zero;
|
||||
static int one_hundred = 100;
|
||||
|
||||
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
|
||||
static int maxolduid = 65535;
|
||||
static int minolduid;
|
||||
@@ -711,6 +724,19 @@ static ctl_table kern_table[] = {
|
||||
.proc_handler = &proc_dointvec,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_DETECT_SOFTLOCKUP
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "softlockup_thresh",
|
||||
.data = &softlockup_thresh,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.strategy = &sysctl_intvec,
|
||||
.extra1 = &one,
|
||||
.extra2 = &sixty,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_COMPAT
|
||||
{
|
||||
.ctl_name = KERN_COMPAT_LOG,
|
||||
@@ -757,13 +783,6 @@ static ctl_table kern_table[] = {
|
||||
{ .ctl_name = 0 }
|
||||
};
|
||||
|
||||
/* Constants for minimum and maximum testing in vm_table.
|
||||
We use these as one-element integer vectors. */
|
||||
static int zero;
|
||||
static int two = 2;
|
||||
static int one_hundred = 100;
|
||||
|
||||
|
||||
static ctl_table vm_table[] = {
|
||||
{
|
||||
.ctl_name = VM_OVERCOMMIT_MEMORY,
|
||||
|
Reference in New Issue
Block a user