Re: start_kernel / local_irq_enable() can be very slow

From: Andrew Morton
Date: Mon Nov 14 2005 - 02:48:06 EST


Pozsar Balazs <pozsy@xxxxxxxxxxx> wrote:
>
> I've noticed that the local_irq_enable() call in
> init/main.c::start_kernel() takes 0.3 .. 3.0 seconds on every boot.
> (Measured using printk's around it.)
>
> I am wondering what happens during this call (which is effectively one
> "sti"), why does it take so much time sometimes, and why does it vary so
> much, why isn't it (more) deterministic.

Presumably as soon as it does the sti, the CPU takes one or more interrupts
and runs off and does something.

I wonder what?

You could do something like:

int trace_irqs;

trace_irqs = 1;
local_irq_enble();
trace_irqs = 0;

then, over in handle_IRQ_event():

if (trace_irqs)
print_symbol("calling %s\n", (unsigned long)action->handler);


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