Skip to contentSkip to conversation

V2 init/main.c Enable watchdog_thresh control from kernel line

PATCH In review Laurence Oberman 2 participants 2 messages Oct 24, 2018 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 V2 init/main.c Enable watchdog_thresh control from kernel line

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.

---
 init/main.c | 9 +++++++++
 1 file changed, 9 insertions(+)
init/main.c +9 -0
index e4a3160..5882750 100644
@@ -977,6 +977,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)
 {
Signature · 5 lines
1.8.3.1

---
 Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +8 -0
index bf03fe4..a5280a1 100644
@@ -4615,6 +4615,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
Signature · 1 line
1.8.3.1
reviewer
#1 lore raw
Quoted 23 lines · Laurence Oberman

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.

---
 init/main.c | 9 +++++++++
 1 file changed, 9 insertions(+)
init/main.c +2 -0
index e4a3160..5882750 100644
@@ -977,6 +977,15 @@ static int __init set_debug_rodata(char *str)
 __setup("rodata=", set_debug_rodata);
 #endif
 
+static int __init
+is_watchdog_thresh_setup(char *str)

init/main.c static int __init set_debug_rodata(char *str) · line 991

Quoted 10 lines
init/main.c +7 -0
+{
+	get_option(&str, &watchdog_thresh);
+	return 1;
+}
+__setup("watchdog_thresh=", is_watchdog_thresh_setup);
+
+
 #ifdef CONFIG_STRICT_KERNEL_RWX
 static void mark_readonly(void)
 {

Hi Laurence,

Let's make this into more of a complete patch.

a. update the diffstat to include the Documentation change

b. send the patch with the Documentation change as part of the same patch, not as a separate patch (It looks like the multiple "---" lines in the email are confusing.)

c. send the patch to someone who can merge it: scripts/get_maintainer.pl top suggestions are:
Thomas Gleixner <[email protected]> or Ingo Molnar <[email protected]>

thanks,

Signature · 1 line
~Randy