Commit e11feaa1192a079ba8e88a12121e9b12d55d4239
Committed by
Ingo Molnar
1 parent
e0944ee63f
Exists in
master
and in
39 other branches
watchdog, hung_task_timeout: Add Kconfig configurable default
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> Acked-by: Mandeep Singh Baines <msb@google.com> Link: http://lkml.kernel.org/r/4DB8600C.8080000@suse.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 16 additions and 1 deletions Side-by-side Diff
kernel/hung_task.c
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | /* |
34 | 34 | * Zero means infinite timeout - no checking done: |
35 | 35 | */ |
36 | -unsigned long __read_mostly sysctl_hung_task_timeout_secs = 120; | |
36 | +unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT; | |
37 | 37 | |
38 | 38 | unsigned long __read_mostly sysctl_hung_task_warnings = 10; |
39 | 39 |
lib/Kconfig.debug
... | ... | @@ -238,6 +238,21 @@ |
238 | 238 | enabled then all held locks will also be reported. This |
239 | 239 | feature has negligible overhead. |
240 | 240 | |
241 | +config DEFAULT_HUNG_TASK_TIMEOUT | |
242 | + int "Default timeout for hung task detection (in seconds)" | |
243 | + depends on DETECT_HUNG_TASK | |
244 | + default 120 | |
245 | + help | |
246 | + This option controls the default timeout (in seconds) used | |
247 | + to determine when a task has become non-responsive and should | |
248 | + be considered hung. | |
249 | + | |
250 | + It can be adjusted at runtime via the kernel.hung_task_timeout | |
251 | + sysctl or by writing a value to /proc/sys/kernel/hung_task_timeout. | |
252 | + | |
253 | + A timeout of 0 disables the check. The default is two minutes. | |
254 | + Keeping the default should be fine in most cases. | |
255 | + | |
241 | 256 | config BOOTPARAM_HUNG_TASK_PANIC |
242 | 257 | bool "Panic (Reboot) On Hung Tasks" |
243 | 258 | depends on DETECT_HUNG_TASK |