Re: Shared interrupt (lack of) handling

Gerard Roudier (groudier@club-internet.fr)
Fri, 3 Sep 1999 22:41:20 +0200 (MET DST)


On Fri, 3 Sep 1999, Brian Swetland wrote:

> [Gerard Roudier <groudier@club-internet.fr>]
> >
> > > One thing that you could do with the I_DID_SOME_STUFF flag is use the
> > > statistics to reorder the execution of interrupt handlers so that the
> > > device that causes the most interrupts gets called first. Might be
> > > cool, difficult to tell.
> >
> > You _must_ call all interrupt handlers that requested the same IRQ when
> > this IRQ is raised. So your flag does not optimize anything.
>
> One thing it does help with is to identify a situation where an interrupt
> is occurring but no installed drivers are responding to it. Buggy hardware
> or a buggy driver causing interrupts other than ones it's handling to
> occur can result in this sort of thing. If a PCI interrupt is triggering
> continuously and nobody is handling it (though somebody has an interrupt
> handler installed) it is sometimes nice to let the system know.

Some heuristic that detects dubious interrupts should not be that hard to
set up. But it wasn't what was presented intially in this thread.

> That interrupt could be temporarily masked, warnings could be injected
> into logs, etc.

Btw, if there is a kernel option that allows to get rid of all that
mostly useless bloat, I will not see any problem, since:

1) A broken driver that will miss relevant interrupts is unusable in the
first place.
2) As unsusable is a broken hardware. Why not injecting a software
soldering iron into the kernel. ;-)
3) A user that run a kernel with some hardware not being handled by a
software driver just get what he deserves.

The right thing to do is:

1) Do all system intialisations and driver initialisations with interrupts
disabled.
2) For all hardware that can be generically detected (or guessed) and that
no driver claims handling, warn user about.
3) Enable interrupts now.

As a result, loading a driver for hardware after system initialisation is
a great idiocy, in my opinion. No need to say that I donnot use modules
for drivers that deal with the hardware and that I will _never_ do so with
Free O/Ses that allow to use linked driver modules. "ld" does the
appropriate loading job for me when I am concerned with drivers that deal
with the hardware.

Doing things simply and the right way avoid most of nasty problems, in
real life, but I.T. seems to have moved to another planet today.

Gérard.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/