Re: overlaping printk

From: Andy Isaacson
Date: Thu May 20 2004 - 11:20:01 EST


On Thu, May 20, 2004 at 05:53:23PM +0200, Ingo Molnar wrote:
> * Ingo Molnar <mingo@xxxxxxx> wrote:
> > another solution would be to break the lock only once during the
> > kernel's lifetime. The system is messed up anyway if it needs multiple
> > lock breaks to get an oops out to the console. We dont care about
> > followup oopses - the first oops is that matters.
>
> i.e. something like the attached patch, against BK-curr. (i've also
> attached a cleanup patch that gets rid of the many instances of
> bust_spinlocks() - we now have a generic one in lib/bust_spinlocks.c)
>
> i consider any secondary lockup after the first oops has been printed a
> feature - sometimes the first oops gets washed away by the many followup
> oopses.

> +unsigned long zap_spinlocks = 1;
[snip]
> - if (oops_in_progress) {
> + if (oops_in_progress && test_and_clear_bit(0, &zap_spinlocks)) {

It looks like this will cause problems if the user experiences an oops
during boot, runs for a few hours, and then has another oops. Won't the
second oops fail to break the lock, and end up just deadlocking?

Yeah, of course you shouldn't blithely ignore the first oops. But I bet
it happens.

Perhaps zap_spinlocks could be reset after 10 minutes without an oops?

-andy
-
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/