Re: [PATCH 1/2] panic: ratelimit panic messages

From: Don Zickus
Date: Wed Jan 05 2011 - 09:01:20 EST


On Wed, Jan 05, 2011 at 02:21:08PM +0100, Ingo Molnar wrote:
>
> * Don Zickus <dzickus@xxxxxxxxxx> wrote:
>
> > Sometimes when things go bad, so much spew is coming on the console it is hard
> > to figure out what happened. This patch allows you to ratelimit the panic
> > messages with the intent that the first panic message will provide the info
> > we need to figure out what happened.
> >
> > Adds new kernel param 'panic_ratelimit=on/<integer in seconds>'
> >
> > Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx>
> > ---
> > Documentation/kernel-parameters.txt | 6 ++++++
> > kernel/panic.c | 30 ++++++++++++++++++++++++++++++
> > 2 files changed, 36 insertions(+), 0 deletions(-)
>
> Well, but it's not just panics that can occur repeatedly (in fact panics tend to
> trigger once), but recursive/repeated oopses.
>
> So if we try to do some sort of 'show first crash, rate-limit afterwards' thing (i'm
> still not 100% sure about the wiseness of it) then we should cover all common
> occurances of system panics/crashes.
>
> btw., while printk-delay exists and can serve a similar purpose, it's pretty
> cumbersome for panic ratelimit: it slows down bootups extremely, and it also slows
> down regular, harmless printks.
>
> So having some sort of rate-limit for emitting crash screens may make sense, while
> also preserving the oops counter or at least some other notification that we 'lost'
> messages.

Ok. I guess I am feeling a little slow today. So would moving this to
the kmsg_dump() function be the right place then?

Cheers,
Don

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