Re: Interrupt Latency.

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Tue, 7 Oct 1997 17:12:05 +0100 (MET)


On Tue, 7 Oct 1997, Harald Koenig wrote:

> > That is, if I put in a driver which responds to an interrupt simply by
> > waggling an output bit on the parallel port or something similar, what kind of
> > time delay will I see if I put a scope on it?
>
> I've tested this long time ago with Linux-1.0...1.3 with my 486DX2/66.
> there I got ~11-12 usec interrupt latency (I just read the timer latch
> in the clock timer ISR, then you exactly know how many usec it took
> from timer countdown to get into the ISR...)

i found this to be constant across CPUs (ie. 10 usecs on a pentium as
well), this is probably due to the fact that PC compatible x86 irq
handling does quite a few ISA cycles. Linux itself adds almost zero to
this latency. (1-2 usecs, mainly due to setting the PIC which is in ISA
space as well)

APIC interrupts are much faster, i measured 4-5 usecs CPU-to-CPU IPI
latencies, and under 1 usecs local APIC interrupts. (like the local APIC
timer interrupt on SMP Linux). So if you want very good interrupt
latencies, add a device to the local IRQ pin of the pentium processor.
(there are 1 or 2 lines, but i've never done this).

-- mingo