[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwczZTA=JUahoj_Sw1fQssDwoM2LGJ6g5nPvehTLxnSpg@mail.gmail.com>
Date: Mon, 25 Jun 2012 17:01:11 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
"kay.sievers" <kay.sievers@...y.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Joe Perches <joe@...ches.com>,
"Paul E. McKenney" <paulmck@...ibm.com>
Subject: Re: [PATCH v3] printk: Have printk() never buffer its data
On Mon, Jun 25, 2012 at 4:55 PM, Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> Stephen and Ingo, I understand that your tests now would require
> multiple printk() lines, but this affects what, 10 boxes in the world
> that run these tests (I'm not trying to be mean, just understand the
> issues). The fixes that now are in place fix problems for many more
> systems, and provide the infrastructure for proper logging that people
> have been screaming at us for over 10 years to accomplish.
I disagree violently.
I think we absolutely should apply Steven's patch.
Why? Because the buffering does not help *anything*, and it's
surprising, and it breaks one of our main debugging tools. There's no
upside to it.
The fact that we found *one* case where it broke within days of it
being introduced is not the issue. Fixing that one case is irrelevant.
It's the unknown number of other cases that did similar thngs that
matter.
If there are other places that print out partial lines, they may have
this problem too. Don't buffer.
And if there are *not* other places that print out partial lines, then
buffering doesn't help. Don't buffer.
Notice? Buffering partial lines is never *ever* the right thing to do
for something like printk.
If you want to merge the partial lines, do it at the *logging* stage,
not at the printout stage. Nobody cares if you buffer the stuff that
actually makes it to "dmesg". But buffering the stuff before it makes
it to the screen is just wrong.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists