Matthew Dillon wrote: > Hmm. I can think of two solutions that avoid masking: > > * Change the trigger mode from level to edge as a means of masking the > interrupt, then change it back to level triggered to unmask. This > would be done in the IO APIC. > > * Change the delivery mode to low-priority for the interrupt that occured > and use the priority field to mask the interrupt to the cpu. This > would be done in the IO APIC with the LAPIC's TPR set appropriately. > > These are off-the-cuff ideas. I don't know how easy or hard it would be > to implement (yet). But, certainly, changing the trigger mode can't be > any more complicated then messing around with the mask. > > -Matt This is a place where two-level interrupt handling like in Mac OSX starts looking attractive. You have the driver quench the source right away in what is basically a fast interrupt handler, then you have an ithread come along later and process the data. I somewhat approximate this with the AAC driver, though I use a taskqueue instead of an ithread. There are definite trade-offs here; sometimes the only way to quench the hardware is to dequeue a status byte that is needed for later data processing. Queueing up this data byte to an ithread, and accounting that there might be more interrupts before the ithread runs, is ugly. Btw, AAC doesn't exhibit aliasing problems in the chipsets that I mentioned precisely because we don't mask the IOAPIC for fast handlers. Unfortunetaly, moving the entire OS to this scheme is quite labor-intensive. It would make just as much sense to implement MSI infrastructre and convert a number of drivers to that. And again, Linux seems immune to this problem, so it's very intriguing to find out why. ScottReceived on Mon Apr 11 2005 - 05:11:59 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:31 UTC