Re: Why no interrupt priorities?

Tim Hockin
2004-02-27T19:12:45Z

On Fri, Feb 27, 2004 at 12:55:55PM -0600, Matt Mackall wrote:
> Let's imagine you have n sources simultaneously interrupting on a
> given descriptor. Check the first, it's happening, acknowledge it,
> exit, notice interrupt still asserted, check the first, nope, check
> the second, yep, exit, etc. By the time we've made it to the nth ISR,
> we've banged on the first one n times, the second n-1 times, etc. In
> other words, early chain termination has an O(n^2) worst case.

That is a pretty pathological worst case, and n is (almost?) always small.
I don't know if it would make a lick of difference, or if it is worth the
risk. Someone who has a lot of shared interrupts ought to try it.