Re: overlaping printk

From: Ingo Molnar
Date: Fri May 21 2004 - 02:00:09 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> Ingo Molnar <mingo@xxxxxxx> wrote:
> >
> > i've attached a new patch that does what Andi suggested too -
> > timestamping of the oopses. This way we will zap no sooner than 10
> > seconds after the first oops.
>
> I think that will do the wrong thing between 23 and 47 days uptime
> because time_after() will return an incorrect answer.
>
> How's this look?

> + static unsigned long oops_timestamp;
> +
> + if (time_after_eq(jiffies, oops_timestamp) &&
> + !time_after(jiffies, oops_timestamp + 30*HZ))
> return;
> +

looks good to me!

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