[RFC] AMD64 @ K8T800/VT8237: Doubled IOAPIC-level-interrupt rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

this should likely be addressed to VIA Taiwan,
but I don't know their engineer's e-mail address and their forum
doesn't work for me.
Maybe somebody here has a clue?
Or maybe this is even motherboard specific?

To reproduce:
	$ aplay -Dhw:0 -fdat /dev/zero

On a sane system (or here in PIC Mode) you'll see
around 12 Interrupts/s.
Here I see 24.

12 per s more is no big deal, but if you run low-latency audio,
the overhead becomes significant.

What exactly happens when i.e. the sounddevice (part of the VT8237)
triggers an interrupt (low level on interrupt pin) is this:

1. IOAPIC accepts interrupt, sends it to CPU's APIC.

2. Interrupt Routine runs,
   tells the sounddevice to deassert the interrupt pin.

3. When sounddevice deasserts pin (low to high transition),
   IOAPIC accepts an interrupt _again_ , tells APIC,
   which also accepts interrupt again (IRR-Bit set).
   _This should not happen_.
   Looks like the IOAPIC (Part of the VT8237) behaves like
   Level Triggered _AND_ Edge Triggered at once!?!

3. Interrupt Routine finishes with sending EOI to the CPU's APIC,
   which tells IOAPIC to accept Interrupts on the soundcards interrupt
   pin _now_.
   But the IOAPIC has already wrongly accepted the next interupt
   in step 2.

4. Processor accepts interrupts again and runs the soundcards
   interruptroutine again.
   Now the interrupt Routine sees a soundcard that doesn't need
   servicing and finishes, having done nothing,
   but clearing up the APIC/IOAPIC.
 
This bad behavior can be eliminated by masking the IOAPIC's interrupt pin
during the phase where the sounddevice's interrupt pin is deasserted.
But (Un)masking is also a cycle-costly operation,
which shouldn't be necessary on a sane system.

So my question here is:
Can the VT8237's IOAPIC (or other device) be programmed in a way
to behave sanely?
Or is this a known bug that can only be circumvented?
If it was an Intel/AMD chipsets I'd likely find those info's
in publicly available docs, but here the problem for me is
to get the docs...
(Or WTF do I buy stuff, which comes without public docs $%§!!grmbl!)

Thanks,
Karsten

	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux