From: Frederic Weisbecker <fweisbec@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Petr Mladek <pmladek@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Dave Anderson <anderson@redhat.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Kay Sievers <kay@vrfy.org>, Michal Hocko <mhocko@suse.cz>,
Jan Kara <jack@suse.cz>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC PATCH 00/11] printk: safe printing in NMI context
Date: Tue, 10 Jun 2014 18:46:42 +0200 [thread overview]
Message-ID: <20140610164641.GD1951@localhost.localdomain> (raw)
In-Reply-To: <alpine.LNX.2.00.1405290959270.17241@pobox.suse.cz>
On Thu, May 29, 2014 at 10:09:48AM +0200, Jiri Kosina wrote:
> On Thu, 29 May 2014, Frederic Weisbecker wrote:
>
> > > I am rather surprised that this patchset hasn't received a single review
> > > comment for 3 weeks.
> > >
> > > Let me point out that the issues Petr is talking about in the cover letter
> > > are real -- we've actually seen the lockups triggered by RCU stall
> > > detector trying to dump stacks on all CPUs, and hard-locking machine up
> > > while doing so.
> > >
> > > So this really needs to be solved.
> >
> > The lack of review may be partly due to a not very appealing changestat
> > on an old codebase that is already unpopular:
> >
> > Documentation/kernel-parameters.txt | 19 +-
> > kernel/printk/printk.c | 1218 +++++++++++++++++++++++++----------
> > 2 files changed, 878 insertions(+), 359 deletions(-)
> >
> >
> > Your patches look clean and pretty nice actually. They must be seriously
> > considered if we want to keep the current locked ring buffer design and
> > extend it to multiple per context buffers. But I wonder if it's worth to
> > continue that way with the printk ancient design.
> >
> > If it takes more than 1000 line changes (including 500 added) to make it
> > finally work correctly with NMIs by working around its fundamental
> > flaws, shouldn't we rather redesign it to use a lockless ring buffer
> > like ftrace or perf ones?
>
> Yeah, printk() has grown over years to a stinking pile of you-know-what,
> no argument to that.
>
> I also agree that performing a massive rewrite, which will make it use a
> lockless buffer, and therefore ultimately solve all its problems
> (scheduler deadlocks, NMI deadlocks, xtime_lock deadlocks) at once, is
> necessary in the long run.
>
> On the other hand, I am completely sure that the diffstat for such rewrite
> is going to be much more scary :)
Indeed, but probably much more valuable in the long term.
>
> This is not adding fancy features to printk(), where we really should be
> saying no; horrible commits like 7ff9554bb5 is exactly something that
> should be pushed against *heavily*. But bugfixes for hard machine lockups
> are a completely different story to me (until we have a whole new printk()
> buffer handling implementation).
Yeah bugfixes are certainly another story. Still it looks like yet another
layer of workaround on a big hack.
But yeah I'm certainly not in a right position to set anyone to do a massive
rewrite on such a boring subsystem :)
There is also a big risk that if we push back this bugfix, nobody will actually do
that desired rewrite.
Lets be crazy and Cc Linus on that.
next prev parent reply other threads:[~2014-06-10 16:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 9:10 [RFC PATCH 00/11] printk: safe printing in NMI context Petr Mladek
2014-05-09 9:10 ` [RFC PATCH 01/11] printk: rename struct printk_log to printk_msg Petr Mladek
2014-05-09 9:10 ` [RFC PATCH 02/11] printk: allow to handle more log buffers Petr Mladek
2014-05-09 9:10 ` [RFC PATCH 03/11] printk: rename "logbuf_lock" to "main_logbuf_lock" Petr Mladek
2014-05-09 9:10 ` [RFC PATCH 04/11] printk: add NMI ring and cont buffers Petr Mladek
2014-05-09 9:10 ` [RFC PATCH 05/11] printk: allow to modify NMI log buffer size using boot parameter Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 06/11] printk: NMI safe printk Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 07/11] printk: right ordering of the cont buffers from NMI context Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 08/11] printk: try hard to print Oops message in " Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 09/11] printk: merge and flush NMI buffer predictably via IRQ work Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 10/11] printk: survive rotation of sequence numbers Petr Mladek
2014-05-09 9:11 ` [RFC PATCH 11/11] printk: avoid staling when merging NMI log buffer Petr Mladek
2014-05-28 22:02 ` [RFC PATCH 00/11] printk: safe printing in NMI context Jiri Kosina
2014-05-29 0:09 ` Frederic Weisbecker
2014-05-29 8:09 ` Jiri Kosina
2014-06-10 16:46 ` Frederic Weisbecker [this message]
2014-06-10 16:57 ` Linus Torvalds
2014-06-10 17:32 ` Jiri Kosina
2014-06-11 9:01 ` Petr Mládek
2014-06-18 11:03 ` Jiri Kosina
2014-06-18 14:36 ` Paul E. McKenney
2014-06-18 14:41 ` Jiri Kosina
2014-06-18 14:44 ` Paul E. McKenney
2014-06-18 14:53 ` Jiri Kosina
2014-06-18 15:07 ` Paul E. McKenney
[not found] ` <CA+55aFwPgDC6gSEPfu3i-pA4f0ZbsTSvykxzX4sXMeLbdXuKrw@mail.gmail.com>
2014-06-18 16:21 ` Paul E. McKenney
2014-06-18 16:38 ` Steven Rostedt
2014-06-18 16:43 ` Paul E. McKenney
2014-06-18 20:36 ` Jiri Kosina
2014-06-18 21:07 ` Paul E. McKenney
2014-06-18 21:12 ` Jiri Kosina
2014-06-18 21:20 ` Paul E. McKenney
2014-06-18 21:32 ` Jiri Kosina
2014-06-18 21:37 ` Paul E. McKenney
2014-06-18 23:20 ` Steven Rostedt
2014-05-30 8:13 ` Jan Kara
2014-05-30 10:10 ` Jiri Kosina
2014-06-10 16:49 ` Frederic Weisbecker
2014-06-12 11:50 ` Petr Mládek
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=20140610164641.GD1951@localhost.localdomain \
--to=fweisbec@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anderson@redhat.com \
--cc=jack@suse.cz \
--cc=jkosina@suse.cz \
--cc=kay@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).