[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae1c5559-4469-448c-87d3-ab458c3c8b24@oracle.com>
Date: Fri, 16 Feb 2024 08:02:20 -0800
From: Stephen Brennan <stephen.s.brennan@...cle.com>
To: John Ogness <john.ogness@...utronix.de>, linux-kernel@...r.kernel.org
Cc: Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH] printk: save loglevel before console_verbose()
On 2/16/24 01:22, John Ogness wrote:
> On 2024-02-15, Stephen Brennan <stephen.s.brennan@...cle.com> wrote:
>> In panic() cases, console_verbose() is called, clobbering the
>> console_loglevel value. If the bug which led to the panic related to
>> printk, it can be useful to know the log level prior to the
>> console_verbose() call.
>
> I've done a *lot* of printk debugging over the past 6 years and have
> never had a case where this would be useful (or even interesting).
Hi John,
That's fair! The point of sending it upstream is seeing if anybody else
uses this information or if I'm the only one :)
> I assume there is some rare and particular scenario you are trying to
> debug. And once you've debugged it, it is no longer useful for you
> either.
>> IMHO this does not warrant adding an extra global variable for all Linux
> users.
I've been seeing bugs (to be fair, on older kernels without the latest
printk/nbcon work, which resolves much of this) caused by excessive
printk logging & slow serial consoles. In some of these cases, the
loglevel was set low at boot but modified by an application, so it has
been nice to know what the _actual_ loglevel was at the time of the
crash, which I can use with the console baud rates and the log buffer to
get an idea for how backlogged the console was at a point in time.
But of course, the console sequence numbers can tell us how backlogged a
console is at the time of crash, and you can infer the log level to some
extent from that. So I can see this not being as valuable generally as
it is for my use case.
Thanks,
Stephen
> When Petr gets back from vacation, maybe he will have a different
> opinion.
>
> John Ogness
Powered by blists - more mailing lists