diff options
author | Dmitry Safonov <dima@arista.com> | 2021-07-27 14:06:35 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2021-07-29 16:29:35 +0200 |
commit | 10102a890b543a8a08457dc69fa55bc032403c7d (patch) | |
tree | 8a39a780a0d740f48f0ff8dae44328577bece30c /include/linux/printk.h | |
parent | c9110dfcfccb3f31eda47a36ed0a022e390d1417 (diff) | |
download | lwn-10102a890b543a8a08457dc69fa55bc032403c7d.tar.gz lwn-10102a890b543a8a08457dc69fa55bc032403c7d.zip |
printk: Add printk.console_no_auto_verbose boot parameter
console_verbose() increases console loglevel to
CONSOLE_LOGLEVEL_MOTORMOUTH, which provides more information
to debug a panic/oops.
Unfortunately, in Arista we maintain some DUTs (Device Under Test) that
are configured to have 9600 baud rate. While verbose console messages
have their value to post-analyze crashes, on such setup they:
- may prevent panic/oops messages being printed
- take too long to flush on console resulting in watchdog reboot
In all our setups we use kdump which saves dmesg buffer after panic,
so in reality those extra messages on console provide no additional value,
but rather add risk of not getting to __crash_kexec().
Provide printk.console_no_auto_verbose boot parameter, which allows
to switch off printk being verbose on oops/panic/lockdep.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Suggested-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Tested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210727130635.675184-3-dima@arista.com
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r-- | include/linux/printk.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index f3f1a1eb19bd..a5e1c5adfc3f 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -69,11 +69,7 @@ extern int console_printk[]; #define minimum_console_loglevel (console_printk[2]) #define default_console_loglevel (console_printk[3]) -static inline void console_verbose(void) -{ - if (console_loglevel) - console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH; -} +extern void console_verbose(void); /* strlen("ratelimit") + 1 */ #define DEVKMSG_STR_MAX_SIZE 10 |