public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hung_task_timeout: configurable default
@ 2011-04-27 18:27 Jeff Mahoney
  2011-04-27 18:36 ` Mandeep Singh Baines
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jeff Mahoney @ 2011-04-27 18:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linux Kernel Mailing List, Mandeep Singh Baines, Andrew Morton

 This patch allows the default value for sysctl_hung_task_timeout_secs
 to be set at build time. The feature carries virtually no overhead,
 so it makes sense to keep it enabled. On heavily loaded systems, though,
 it can end up triggering stack traces when there is no bug other than
 the system being underprovisioned. We use this patch to keep the hung task
 facility available but disabled at boot-time.

 The default of 120 seconds is preserved. As a note, commit e162b39a may
 have accidentally reverted commit fb822db4, which raised the default from
 120 seconds to 480 seconds.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 kernel/hung_task.c |    3 ++-
 lib/Kconfig.debug  |   14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -33,7 +33,8 @@ unsigned long __read_mostly sysctl_hung_
 /*
  * Zero means infinite timeout - no checking done:
  */
-unsigned long __read_mostly sysctl_hung_task_timeout_secs = 120;
+unsigned long __read_mostly sysctl_hung_task_timeout_secs =
+					CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
 
 unsigned long __read_mostly sysctl_hung_task_warnings = 10;
 
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -214,6 +214,20 @@ config DETECT_HUNG_TASK
 	  enabled then all held locks will also be reported. This
 	  feature has negligible overhead.
 
+config DEFAULT_HUNG_TASK_TIMEOUT
+	int "Default timeout for hung task detection (in seconds)"
+	depends on DETECT_HUNG_TASK
+	default 120
+	help
+	  This option controls the default timeout (in seconds) used
+	  to determine when a task has become non-responsive and should
+	  be considered hung.
+
+	  It can be adjusted at runtime via the kernel.hung_task_timeout
+	  sysctl or by writing a value to /proc/sys/kernel/hung_task_timeout.
+
+	  A timeout of 0 disables the check.  The default is 120 seconds.
+
 config BOOTPARAM_HUNG_TASK_PANIC
 	bool "Panic (Reboot) On Hung Tasks"
 	depends on DETECT_HUNG_TASK
-- 
Jeff Mahoney
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-04 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 18:27 [PATCH] hung_task_timeout: configurable default Jeff Mahoney
2011-04-27 18:36 ` Mandeep Singh Baines
2011-04-28 10:00 ` [tip:core/locking] watchdog, hung_task_timeout: Add Kconfig " tip-bot for Jeff Mahoney
2011-05-04 22:05 ` [PATCH] hung_task_timeout: " Andrew Morton
2011-05-04 22:38   ` Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox