On Mon, 24 Apr 2006, Alan Cox wrote:
>
> > The fake interrupt could even print out a warning if somebody returns
> > SA_HANDLED (since normally there _shouldn't_ have been any work to handle
> > for it), and if that means that for somebody, things go from "the machine
> > hung" to "the machine got very slow, and printed out 'fake interrupt for
> > ide0 returned SA_HANDLED!'", that would potentially be a big debug aid.
>
> There are high rate IRQ sources that would trigger that erratically due to
> races but it could be useful in some kind of "linux irqdebug" mode
I was thinking that an interrupt actually happening on that irq would set
the "already done" flag, so that if it's a high-rate irq, then we'd not
inject any new fake ones.
So the algorithm would be something like "clear the 'already done' flag
every five seconds, and sending the fake one if it was already cleared",
with normal interrupts always setting the flag.
And yes, you could still hit it in a blue moon (nothing happened for five
seconds, and then it happens _just_ as we send a fake event), but if the
only thing we do is do a printk() on it, no big deal if you get a false
positive every five years.
(The bigger problem is that some drivers just return IRQ_HANDLED whether
they had work to do or not, because people - including me - were lazy in
some of the conversion of the irq_handler_t stuff).
I dunno. It _sounds_ simple enough..
Linus
-
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]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]