All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: Petr Mladek <pmladek@suse.com>
Cc: linux-kernel@vger.kernel.org,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	John Ogness <john.ogness@linutronix.de>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] printk: Add CONFIG_CONSOLE_LOGLEVEL_PANIC
Date: Mon, 28 Jun 2021 18:26:32 +0100	[thread overview]
Message-ID: <335af380-3bb0-c1c4-ddd5-5c9585d12612@arista.com> (raw)
In-Reply-To: <YNnD3b1wKfDODKnw@alley>

On 6/28/21 1:43 PM, Petr Mladek wrote:
[..]
> Is it enough to keep the current level during panic()?

Yes.

> It might be
> easier to introduce a commandline option, for example, no_console_verbose_panic.
> It would do:
> 
> static inline void console_verbose_panic(void)
> {
> 	if (!no_console_verbose_panic)
> 		console_verbose();
> }
> 
> It is clear what it does. On the other hand, the logic with particular
> loglevels is not clear. 3 different proposals has already been mentioned
> in this thread:
> 
> 	if (console_loglevel &&
> 	    (CONFIG_CONSOLE_LOGLEVEL_PANIC > console_loglevel)) {
> 		console_loglevel = CONFIG_CONSOLE_LOGLEVEL_PANIC;
> 	}
> 
> vs.
> 
> 	if (console_loglevel)
> 		console_loglevel = CONFIG_CONSOLE_LOGLEVEL_PANIC;
> 
> vs.
> 
> 	if (console_loglevel && CONFIG_CONSOLE_LOGLEVEL_PANIC)
> 		console_loglevel = CONFIG_CONSOLE_LOGLEVEL_PANIC;
> 
> 
> Just imagine that you are a distributor, developer or admin:
> 
>    What value you would choose for CONFIG_CONSOLE_LOGLEVEL_PANIC?
>    What console loglevel will be used at the end?
> 
> The answer depends on the implemented alhorith, console_loglevel,
> and CONFIG_CONSOLE_LOGLEVEL_PANIC.
> 
> The answer would be much easier if "no_verbose_console_panic" is
> used instead.

Thanks for your replies, Petr, I'll send v2 with the function rename
patch and a patch to introduce this boot option, after the merge window
closes. I appreciate your inputs :-)

Thanks,
          Dmitry

      reply	other threads:[~2021-06-28 17:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 14:33 [PATCH] printk: Add CONFIG_CONSOLE_LOGLEVEL_PANIC Dmitry Safonov
2021-06-25  9:13 ` Petr Mladek
2021-06-25 12:17   ` Dmitry Safonov
2021-06-28 12:43     ` Petr Mladek
2021-06-28 17:26       ` Dmitry Safonov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=335af380-3bb0-c1c4-ddd5-5c9585d12612@arista.com \
    --to=dima@arista.com \
    --cc=0x7f454c46@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.