Re: 2us Interrupt latency's for Linux 2.0.xx

Etienne Lorrain (lorrain@fb.sony.de)
Fri, 4 Sep 1998 12:05:27 +0001


Perry Harrington <pedward@sun4.apsoft.com> wrote:
> I'm wondering, can the APIC be enabled for UP boards? If so, why
> doesn't Linux enable the APIC as the default interrupt controller
> for single processor Pentium+ systems?
>
> > _external_ interrupts have much higher latencies. (especially
> > as old XT-PIC interrupts halt the CPU for a considerable
> > amount of time ... this is not the case with IO-APIC and
> > inter-CPU interrupts.)
> > -- mingo

Hi,

Also APIC reacts differently to IRQ, it let the processor
continue to work while transfering informations concerning
the IRQ, the "usual" waiting loops are broken.

For instance, this extract of 2.1.119
drivers/sound/sb_common.c :
--------------------------------------------------
#if defined(__SMP__)
/* Skip IRQ detection if SMP (doesn't work) */
devc->irq_ok = 1;
#else
if (devc->major == 4 && devc->minor <= 11 ) /* Won't work */
devc->irq_ok = 1;
else
{
int n;

for (n = 0; n < 3 && devc->irq_ok == 0; n++)
{
if (sb_dsp_command(devc, 0xf2)) /* Cause interrupt
immediately */ {
int i;

for (i = 0; !devc->irq_ok && i < 10000; i++);
}
}
if (!devc->irq_ok)
printk(KERN_WARNING "sb: Interrupt test on IRQ%d failed -
Probable IRQ conflict\n", devc->irq);
else
{
DDB(printk("IRQ test OK (IRQ%d)\n", devc->irq));
}
}
#endif /* __SMP__ */
-------------------------------------------------------

First, it should be something like
#if defined(__APIC__)

And the empty "for" will probably fail because it will not
wait enought (anyway "i" is not declared volatile, so a
good optimising compiler may remove the loop).
Seems that "udelay(10);" would be better here.

I was just poking arround, I am not interrested in sound.
Etienne

--
-- The world belong to its organizer.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html