From: Petr Mladek <pmladek@suse.com>
To: Gavin Hu <gavin.hu.2010@gmail.com>
Cc: linux-kernel@vger.kernel.org, Alex Elder <elder@linaro.org>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
Joe Perches <joe@perches.com>,
Peter Hurley <peter@hurleysoftware.com>,
Tejun Heo <tj@kernel.org>,
cxie4@marvell.com, cldu@marvell.com, xjian@marvell.com,
fswu@marvell.com, Jan Kara <jack@suse.cz>
Subject: Re: printk: preempt_disable with long time resulting in softlockup/RCU stall issues
Date: Wed, 8 Jul 2015 10:13:34 +0200 [thread overview]
Message-ID: <20150708081334.GJ32664@pathway.suse.cz> (raw)
In-Reply-To: <CABiPGEe=5tO5ffopExaHWV=fCb98vD5gHirt6vgXciA3hDrOfg@mail.gmail.com>
On Wed 2015-07-08 15:20:01, Gavin Hu wrote:
> Hi,
> You know, a simple pirntk like printk("hello world!\n") via serial
> console may consume 21 seconds above, because any printk is obligated to
> pump out all the characters in the log buffer
> with preempt disable until it is empty (vprintk_emit() and
> console_unlock()), not just "hello world!" itself.
>
> And in the end, long time preempt disable may result in the softlock/RCU
> stall issues. Some systems are configured to trigger a kernel panic when
> meet softlock/ RCU stall. So heavy printk may result in kernel panic.
> Usually, the solution is to remove related pritnks or limit the printk
> times. So sometimes, the low-level developers have to handle various heavy
> pirntk issues.
>
> Why don't make the printk mechanism more flexible and configurable, for
> example, just pump out 1000 messages per printk calling, to avoid preempt
> disable with a long time?
> And we can disable or enable this feature by a proc interface. Be default,
> this feature is disabled. So it doesn't influence boot-time message printk.
>
> Anyway, we maybe can give the low-level developers more options.
>
> Any comments are welcome!
I add Jack into CC because he made several attempts to address this
issue in the past. For example, see
https://lkml.org/lkml/2013/2/26/743
Jack's approach was similar but also tried to schedule further
writing to the console. With your approach, the console might stay
far behind the reality for a long time.
IMHO, we also want to make sure that all messages go out
when the system is panicking.
Best Regards,
Petr
next parent reply other threads:[~2015-07-08 8:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABiPGEe=5tO5ffopExaHWV=fCb98vD5gHirt6vgXciA3hDrOfg@mail.gmail.com>
2015-07-08 8:13 ` Petr Mladek [this message]
[not found] ` <CABiPGEcBUiBfJYAREbiM0LDQM+iNeOzKmC_oCaL0Zh_humH23Q@mail.gmail.com>
2015-07-08 17:04 ` printk: preempt_disable with long time resulting in softlockup/RCU stall issues Luis R. Rodriguez
2015-07-08 17:35 ` Joe Perches
2015-07-08 18:00 ` Steven Rostedt
2015-07-09 7:56 ` Petr Mladek
2015-07-09 14:10 ` Jan Kara
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=20150708081334.GJ32664@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=cldu@marvell.com \
--cc=cxie4@marvell.com \
--cc=elder@linaro.org \
--cc=fswu@marvell.com \
--cc=gavin.hu.2010@gmail.com \
--cc=jack@suse.cz \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@suse.com \
--cc=peter@hurleysoftware.com \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=xjian@marvell.com \
/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