Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11295055 authored by Laurence Oberman's avatar Laurence Oberman Committed by Thomas Gleixner
Browse files

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: default avatarLaurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarThomas 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
parent 5b744981
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4957,6 +4957,14 @@
			or other driver-specific files in the
			Documentation/watchdog/ directory.

	watchdog_thresh=
			[KNL]
			Set the hard lockup detector stall duration
			threshold in seconds. The soft lockup detector
			threshold is set to twice the value. A value of 0
			disables both lockup detectors. Default is 10
			seconds.

	workqueue.watchdog_thresh=
			If CONFIG_WQ_WATCHDOG is configured, workqueue can
			warn stall conditions and dump internal state to
+7 −0
Original line number Diff line number Diff line
@@ -199,6 +199,13 @@ static int __init nosoftlockup_setup(char *str)
}
__setup("nosoftlockup", nosoftlockup_setup);

static int __init watchdog_thresh_setup(char *str)
{
	get_option(&str, &watchdog_thresh);
	return 1;
}
__setup("watchdog_thresh=", watchdog_thresh_setup);

#ifdef CONFIG_SMP
int __read_mostly sysctl_softlockup_all_cpu_backtrace;