From: Petr Mladek <pmladek@suse.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Joe Perches <joe@perches.com>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
Gavin Hu <gavin.hu.2010@gmail.com>,
linux-kernel@vger.kernel.org, Alex Elder <elder@linaro.org>,
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: Thu, 9 Jul 2015 09:56:50 +0200 [thread overview]
Message-ID: <20150709075650.GA2673@pathway.suse.cz> (raw)
In-Reply-To: <20150708140017.6c96d4d5@gandalf.local.home>
On Wed 2015-07-08 14:00:17, Steven Rostedt wrote:
> On Wed, 08 Jul 2015 10:35:29 -0700
> Joe Perches <joe@perches.com> wrote:
>
> > On Wed, 2015-07-08 at 19:04 +0200, Luis R. Rodriguez wrote:
> > > On Wed, Jul 08, 2015 at 05:08:35PM +0800, Gavin Hu wrote:
> > > > Hi,
> > > >
> > > > Yes. We should disable the printk_limit feature when panic to avoid missing
> > > > messages.
> > >
> > > Sounds like you have been looking into it and have a good idea of what you
> > > want to do, why not try it and send some RFC patches ?
> > >
> > > While at it, then we could consider doing different things depending on the
> > > message type. KERN_EMERG would disable preemption, whereas KERN_INFO may not be
> > > so critical to require it.
> >
> > That might be a bit difficult to implement with complete correctness
> > given KERN_EMERG use and continuation lines.
> >
>
> Or just have the current context determine what to do. If printk() was
> called with preemption or interrupts disabled, it flushes the full
> buffer before returning, otherwise it allows the writes to console be
> preempted.
I am afraid that any variant of this approach will make the original
problem even worse. There will be more messages waiting and it will
increase the chance of the softlockup.
I guess that people call printk() with disabled interrupts or
preemption with the naive hope that it will be fast (just store
the message in the ring buffer and come back).
I think that we really need to break the console output when it
takes too long and schedule it somewhere else.
Best Regards,
Petr
next prev parent reply other threads:[~2015-07-09 7:57 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 ` printk: preempt_disable with long time resulting in softlockup/RCU stall issues Petr Mladek
[not found] ` <CABiPGEcBUiBfJYAREbiM0LDQM+iNeOzKmC_oCaL0Zh_humH23Q@mail.gmail.com>
2015-07-08 17:04 ` Luis R. Rodriguez
2015-07-08 17:35 ` Joe Perches
2015-07-08 18:00 ` Steven Rostedt
2015-07-09 7:56 ` Petr Mladek [this message]
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=20150709075650.GA2673@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