linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] V3 init/main.c Enable watchdog_thresh control from kernel line
@ 2018-10-24 16:53 Laurence Oberman
  2018-10-24 17:43 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Laurence Oberman @ 2018-10-24 16:53 UTC (permalink / raw)
  To: linux-kernel, loberman; +Cc: rdunlap, tglx

Both graphics and serial consoles are exposed to hard lockups
when handling a large amount of messaging. The kernel watchdog_thresh
parameter up to now has not been available to be set on the kernel line for
early boot.
This patch allows the setting of watchdog_thresh to be increased
when needed to avoid the hard lockups in the console code.

Signed-off-by: Laurence Oberman <loberman@redhat.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++
 init/main.c                                     | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 4cdcd1a..cd8d588 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4932,6 +4932,14 @@
 			or other driver-specific files in the
 			Documentation/watchdog/ directory.
 
+	watchdog_thresh=
+			This parameter is now available as a kernel line
+			parameter. Use watchdog_thresh=30 as example
+			This will allow early boot changes of the current
+			default of 10s to be increased when needed to
+			avoid hard lockups.
+			Default: 10
+
 	workqueue.watchdog_thresh=
 			If CONFIG_WQ_WATCHDOG is configured, workqueue can
 			warn stall conditions and dump internal state to
diff --git a/init/main.c b/init/main.c
index 1c3f902..88cbed9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1038,6 +1038,15 @@ static int __init set_debug_rodata(char *str)
 __setup("rodata=", set_debug_rodata);
 #endif
 
+static int __init
+is_watchdog_thresh_setup(char *str)
+{
+	get_option(&str, &watchdog_thresh);
+	return 1;
+}
+__setup("watchdog_thresh=", is_watchdog_thresh_setup);
+
+
 #ifdef CONFIG_STRICT_KERNEL_RWX
 static void mark_readonly(void)
 {
-- 
1.8.3.1


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

end of thread, other threads:[~2018-10-24 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 16:53 [PATCH] V3 init/main.c Enable watchdog_thresh control from kernel line Laurence Oberman
2018-10-24 17:43 ` Randy Dunlap
2018-10-24 18:23 ` kbuild test robot
2018-10-24 18:40   ` Laurence Oberman
2018-10-24 19:58 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).