Re: [PATCH] panic: keep blinking in spite of long spin timer mode

From: Andrew Morton
Date: Wed Jun 02 2010 - 14:40:47 EST


On Fri, 28 May 2010 06:56:45 +0900
TAMUKI Shoichi <tamuki@xxxxxxxxxxx> wrote:

> To keep panic_timeout accuracy when running under a hypervisor, the
> current implementation only spins on long time (1 second) calls to
> mdelay. That brings a good effect, but we must give up blinking even
> if we have a panic_blink.
>
> This patch keeps blinking in spite of long spin timer mode.
>
> We now have new kernel parameter (panic_longspin) to enable long spin
> timer mode when kernel panics. This is to be used when running under
> a hypervisor (default is disable).

The whole panic-blink setup seems rather poorly thought out.

Would it not be better if a call to (*panic_blink)() were to simply set
the state of the LED and then return? So callers can do

int state = 0;

for ( ; ; ) {
(*panic_blink)(state);
state ^= 1;
mdelay(MSEC_PER_SEC);
}

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