Skip to content

Commit 1129505

Browse files
lobermanKAGA-KOKO
authored andcommitted
watchdog/core: Add watchdog_thresh command line parameter
The hard and soft lockup detector threshold has a default value of 10 seconds which can only be changed via sysctl. During early boot lockup detection can trigger when noisy debugging emits a large amount of messages to the console, but there is no way to set a larger threshold on the kernel command line. The detector can only be completely disabled. Add a new watchdog_thresh= command line parameter to allow boot time control over the threshold. It works in the same way as the sysctl and affects both the soft and the hard lockup detectors. Signed-off-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: rdunlap@infradead.org Cc: prarit@redhat.com Link: https://lkml.kernel.org/r/1541079018-13953-1-git-send-email-loberman@redhat.com
1 parent 5b74498 commit 1129505

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,6 +4957,14 @@
49574957
or other driver-specific files in the
49584958
Documentation/watchdog/ directory.
49594959

4960+
watchdog_thresh=
4961+
[KNL]
4962+
Set the hard lockup detector stall duration
4963+
threshold in seconds. The soft lockup detector
4964+
threshold is set to twice the value. A value of 0
4965+
disables both lockup detectors. Default is 10
4966+
seconds.
4967+
49604968
workqueue.watchdog_thresh=
49614969
If CONFIG_WQ_WATCHDOG is configured, workqueue can
49624970
warn stall conditions and dump internal state to

kernel/watchdog.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ static int __init nosoftlockup_setup(char *str)
199199
}
200200
__setup("nosoftlockup", nosoftlockup_setup);
201201

202+
static int __init watchdog_thresh_setup(char *str)
203+
{
204+
get_option(&str, &watchdog_thresh);
205+
return 1;
206+
}
207+
__setup("watchdog_thresh=", watchdog_thresh_setup);
208+
202209
#ifdef CONFIG_SMP
203210
int __read_mostly sysctl_softlockup_all_cpu_backtrace;
204211

0 commit comments

Comments
 (0)