Re: [PATCH] defer printks in irqs

From: Tim Bird
Date: Mon Jan 28 2008 - 16:17:51 EST


Andrew Morton wrote:
On Thu, 24 Jan 2008 15:23:03 -0800 Tim Bird <tim.bird@xxxxxxxxxxx> wrote:
Peter Zijlstra wrote:
I suspect these features reduce the chance a crash messages makes it out
onto the console, but fail to spot any of the copious text mention this
critical issue.
Anything not in interrupts would not be deferred.
The following code is meant to avoid deferring in oops as well.
I'm not sure if that covers all crash cases or not.
If you know of other cases, and ways to detect them, please advise.


Yes, using oops_in_progress seems an appropriate fix for that.

I assume that another downside is that printk-from-interrupt will now get
jumbled up with an interrupted pritk-from-non-interrupt.

No. The order of printk messages (whether printk'ed
from interrupt context or not) should not be affected.
This patch should only affect the timing of when the
messages are output to console.

Note that an oops will flush any buffered messages
ahead of the oops messages themselves.

Some messages, not in oops, that were printk'ed in
interrupt context, may still be in the log buffer
but not have made it to console if the machine hangs
hard. Because of this (IMO slight) downgrade in
debugging utility, I chose to make the changes
configurable.

Please use checkpatch.

Will do from now on! Thanks!
-- Tim


=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/