mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: "Luis R. Rodriguez" <mcgrof@suse.com>
Cc: Gavin Hu <gavin.hu.2010@gmail.com>,
	Petr Mladek <pmladek@suse.com>,
	linux-kernel@vger.kernel.org, Alex Elder <elder@linaro.org>,
	"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: Thu, 9 Jul 2015 16:10:42 +0200	[thread overview]
Message-ID: <20150709141042.GH2900@quack.suse.cz> (raw)
In-Reply-To: <20150708170402.GZ7021@wotan.suse.de>

On Wed 08-07-15 19:04:02, 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 ?

Well, there are patches which try to fix this problem. Petr has referenced
them (at least one posting of them) and we do carry them in SLES kernels
(since without them some big machines aren't able to boot with serial
console attached). The biggest obstacle for them to get merged was that:

a) Andrew Morton didn't like the additional complexity in the printk code.

b) Alan Cox was objecting that the problem isn't in the printk code but
rather in serial console drivers which are too slow to print and thus we
should instead implement some buffering there.

If people care, I can refresh my memory where we ended, refresh the patches
and repost them. Probably we should deal with this one way or another...

> 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.

I don't think keying on message type is a good idea. You want to keep
message ordering in the first place so KERN_EMERG message would have to
print everything before it in the printk ring buffer but with other levels
being async this may take even longer than before... So I don't think we
should do that unless really necessary. Printk code currently keys on
'oops_in_progress' to do some special hacks making messages more likely to
appear on console and my patches use the same to switch to a sync mode
where we write out everything we have regardless of how long it takes (at
that point we are doomed anyway so some additional softlockup won't make
matters much worse).

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      parent reply	other threads:[~2015-07-09 14:10 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
     [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
2015-07-09 14:10       ` Jan Kara [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=20150709141042.GH2900@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=cldu@marvell.com \
    --cc=cxie4@marvell.com \
    --cc=elder@linaro.org \
    --cc=fswu@marvell.com \
    --cc=gavin.hu.2010@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=peter@hurleysoftware.com \
    --cc=pmladek@suse.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

all inboxes | Powered by JetHome®