Subject: Re: results of the IRC debug patch
To: Michael <macallan18@earthlink.net>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: port-macppc
Date: 12/04/2004 22:38:05
On Sat, 04 Dec 2004 21:22:00 +0000, Michael wrote:

>> The levels blocked by intr_calcmasks() is the union of the IPL levels of
>> all devices sharing the IRQ.  Sharing an IRQ between an audio and a USB
>> device would be particularly bad: USB is supposed to be at a low
>> priority (IPL_USB == IPL_BIO), but this device gets elevated to
>> IPL_AUDIO.  Even worse, any code running at IPL_BIO would block the
>> shared IRQ, so the audio interrupt will experience high latency.
> 
> Hmm, naive thought: what if we wouldn't OR the IPLs of a given IRQ but
> instead put all on the same level, IPL_AUDIO in this case? This would give
> the USB code undue priority but it should reduce the confusion.

No, this is impossible, it would make the USB interrupts non-blocked when
some code requests them to be blocked, leading to a race condition. On the
other hand, blocking the audio interupt when it should not be blocked can
have bad impact on audio latency, but can't (shouldn't?) cause a bug.

Bye	Pavel