[lkml]   [2012]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] printk: Add printk_flush() to force buffered text to console
On Fri, 2012-06-22 at 16:49 -0700, Andrew Morton wrote:

> If a driver does
> printk("testing the frobnozzle ...");
> do_test();
> printk(" OK\n");
> and do_test() hangs up, we really really want the user to know that
> there was a frobnozzle testing problem. Please tell me this isn't
> broken.

OK, then I wont tell you :-) But this is exactly what happened to me.
There was a config that caused the function tracer self test to triple
fault the machine. The test does exactly what you just described:

printk("Testing trace %s: ", tracer->name);
ret = run_tests(tracer);
if (ret == 0)

But because of this new buffering, that didn't print. And unfortunately,
the previous printk was the start of the rcu torture test. Thus when
Fengguang saw that the last thing printed before his machine crashed was
the rcu torture tests starting, he obviously (but incorrectly) blamed it
on the rcu torture test.

Yes, I think this is broken by design. But I have an idea for a fix.
I'll work on it on Monday, and it wont require adding a pr_flush() like
I did in this patch set.

-- Steve

 \ /
  Last update: 2012-06-23 02:41    [W:0.064 / U:5.356 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site