From: Dmitry Safonov <dima@arista.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Juri Lelli <juri.lelli@redhat.com>,
linux-sh@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Ben Segall <bsegall@google.com>, Guo Ren <guoren@kernel.org>,
Pavel Machek <pavel@ucw.cz>,
Vincent Guittot <vincent.guittot@linaro.org>,
Paul Burton <paulburton@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Mel Gorman <mgorman@suse.de>, Jiri Slaby <jslaby@suse.com>,
Matt Turner <mattst88@gmail.com>,
uclinux-h8-devel@lists.sourceforge.jp,
Len Brown <len.brown@intel.com>,
linux-pm@vger.kernel.org,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-um@lists.infradead.org,
Thomas Gleixner <tglx@linutronix.de>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Richard Henderson <rth@twiddle.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org, Ralf Baechle <r>
Subject: Re: [PATCH 00/50] Add log level to show_stack()
Date: Wed, 6 Nov 2019 16:12:01 +0000 [thread overview]
Message-ID: <de8a397d-8660-4ace-9626-127debcf43a7@arista.com> (raw)
In-Reply-To: <20191106083538.z5nlpuf64cigxigh@pathway.suse.cz>
On 11/6/19 8:35 AM, Petr Mladek wrote:
> On Wed 2019-11-06 03:04:51, Dmitry Safonov wrote:
>> Add log level argument to show_stack().
>> Done in three stages:
>> 1. Introducing show_stack_loglvl() for every architecture
>> 2. Migrating old users with an explicit log level
>> 3. Renaming show_stack_loglvl() into show_stack()
>>
>> Justification:
>> o It's a design mistake to move a business-logic decision
>> into platform realization detail.
>> o I have currently two patches sets that would benefit from this work:
>> Removing console_loglevel jumps in sysrq driver [1]
>
> Just to clarify. The problem in sysrq driver is a bit different.
> It modifies console_loglevel to show even less important message
> on the console.
>
> IMHO, it should be solved by printing the header line with pr_error().
> It is not ideal. A cleaner solution might be to introduce another
> loglevel that will always get pushed to the console. But I am
> not sure if it is worth this single line.
I believe why it's not done - there is a comment in sysrq code that said
the userspace relies on the loglevel of sysrq messages (and may trigger
alerts from emerg/err log level):
* Raise the apparent loglevel to maximum so that the sysrq header
* is shown to provide the user with positive feedback. We do not
* simply emit this at KERN_EMERG as that would change message
* routing in the consumers of /proc/kmsg.
But I don't mind any solution.
>> Hung task warning before panic [2] - suggested by Tetsuo (but he
>> probably didn't realise what it would involve).
>> o While doing (1), (2) the backtraces were adjusted to headers
>> and other messages for each situation - so there won't be a situation
>> when the backtrace is printed, but the headers are missing because
>> they have lesser log level (or the reverse).
>> o As the result in (2) plays with console_loglevel for kdb are removed.
>
>> The least important for upstream, but maybe still worth to note that
>> every company I've worked in so far had an off-list patch to print
>> backtrace with the needed log level (but only for the architecture they
>> cared about).
>> If you have other ideas how you will benefit from show_stack() with
>> a log level - please, reply to this cover letter.
>
> I agree with all the other justification.
>
> I would add. The backtrace is really useful for debugging. It should
> be possible to print it even in less critical situations.
>
> I am afraid that many people use WARN() for this purpose. But WARN()
> is not always appropriate. WARN() misuse huts when panic_on_warn
> option is used.
Thanks, Petr.
--
Dmitry
next prev parent reply other threads:[~2019-11-06 16:12 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 3:04 [PATCH 00/50] Add log level to show_stack() Dmitry Safonov
2019-11-06 3:04 ` [PATCH 02/50] alpha: Add show_stack_loglvl() Dmitry Safonov
2019-11-06 8:35 ` [PATCH 00/50] Add log level to show_stack() Petr Mladek
2019-11-06 16:12 ` Dmitry Safonov [this message]
2019-11-08 10:37 ` Sergey Senozhatsky
2019-11-08 13:04 ` Petr Mladek
2019-11-11 1:23 ` Sergey Senozhatsky
2019-11-11 9:12 ` Petr Mladek
2019-11-12 4:44 ` Sergey Senozhatsky
2019-11-12 4:57 ` Sergey Senozhatsky
2019-11-12 8:35 ` Petr Mladek
2019-11-12 10:12 ` Sergey Senozhatsky
2019-11-13 1:23 ` Sergey Senozhatsky
2019-11-13 2:25 ` Dmitry Safonov
2019-11-13 6:33 ` Sergey Senozhatsky
2019-11-13 8:47 ` Petr Mladek
2019-11-13 16:24 ` Steven Rostedt
2019-11-13 16:40 ` Dmitry Safonov
2019-11-15 0:50 ` Sergey Senozhatsky
2019-11-13 15:32 ` Steven Rostedt
2019-11-11 19:47 ` Dmitry Safonov
2019-11-12 2:17 ` Sergey Senozhatsky
2019-11-12 2:40 ` Dmitry Safonov
2019-11-12 4:25 ` Sergey Senozhatsky
2019-11-13 2:41 ` Dmitry Safonov
2019-11-13 2:51 ` Sergey Senozhatsky
2019-11-13 15:39 ` Steven Rostedt
2019-11-15 3:36 ` Sergey Senozhatsky
2019-11-06 9:20 ` Peter Zijlstra
2019-11-06 16:27 ` Dmitry Safonov
2019-11-06 20:34 ` Peter Zijlstra
2019-11-06 23:25 ` Russell King - ARM Linux admin
2019-11-13 15:44 ` Steven Rostedt
2019-11-08 16:28 ` Dmitry Safonov
2019-11-08 17:30 ` Russell King - ARM Linux admin
2019-11-08 21:08 ` Dmitry Safonov
2019-11-13 15:41 ` Steven Rostedt
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=de8a397d-8660-4ace-9626-127debcf43a7@arista.com \
--to=dima@arista.com \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=heiko.carstens@de.ibm.com \
--cc=jslaby@suse.com \
--cc=juri.lelli@redhat.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=mattst88@gmail.com \
--cc=mgorman@suse.de \
--cc=mpe@ellerman.id.au \
--cc=paulburton@kernel.org \
--cc=pavel@ucw.cz \
--cc=pmladek@suse.com \
--cc=rjw@rjwysocki.net \
--cc=rth@twiddle.net \
--cc=tglx@linutronix.de \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox