Re: about interrupt latency

From: Zwane Mwaikambo
Date: Tue Mar 08 2005 - 14:13:06 EST


Hi Francesco,

On Tue, 8 Mar 2005, Francesco Oppedisano wrote:

> i'm trying to estimate the interrupt latency (time between hardware
> interrrupt and the start of the ISR) of a linux kernel 2.4.29 and i used
> a simple tecnique: inside the do_timer_interrupt i read the 8259 counter
> to obtain the elapsed time. By this mean i found a latency of about 6/7
> microseconds that is very similar to the time measured in some articles
> but with CPU much slower while i expected the latency was shorter on
> faster CPUs. So, my questions are: 1)what's the depency between the
> interrupt latency and the CPU speed? 2)what are the factors at the
> origin of th interrupt latency?

At some cpu frequency point on i386 the main cause of your interrupt
service latency will be in the interrupt controller and how long from irq
assertion to the signal being recognised, resultant vector being
dispatched to the processor and the necessary interrupt controller
acknowledge steps required. This is also helped by the fact that the
Linux/i386 interrupt vector stubs are very small and fast, so there isn't
all that much code to execute to reach the ISR from the vector table. I'm
not sure if you've tested this, but you may notice that timer interrupt
via Local APIC will have lower dispatch latency than timer interrupt via
i8259 only. But that's all at the lower end of the latency graph, you will
most likely run into other sources on a busy system.

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