Re: Today Linus redesigns the networking driver interface (was Re: tulip driver in ...)

Richard Gooch (rgooch@atnf.csiro.au)
Tue, 22 Sep 1998 17:04:13 +1000


Doug Ledford writes:
> Richard Gooch wrote:
>
> > Or a mechanism to say "don't run BH when I'm done". Having
> > SA_INTERRUPT=0 in 2.1.x or 2.3.x would be safe if we can throttle BH
> > processing, right?
>
> I don't need either of them for myself personally. But the talks over the
> net_bh make it apparrent that something needs to be done. But, in those
> cases, I think the end result was throttling the actual interrupt, not the
> bottom half stuff.
[...]
> > Ah, OK. So do you feel that a mechanism in BH processing to
> > self-throttle is a good approach?
> > If so, a patch for 2.3.x may turn up...
>
> I was under the impression that the discussion here had lead more to the
> conclusion that the code needs to throttle the actual interrupts, not the
> bottom half stuff.

Yeah, OK. It seems there may still be cause to have a mechanism
whereby the serial driver can avoid bottom half processing, and
perhaps also for the NCR driver (and the Buslogic?), though.

Actually, this opens up a question for me: what is taking so long in
the BH processing, anyway? Surely the check of (bh_active & bh_mask)
is not the issue. So if an interrupt handler doesn't register/make
active a BH, then the so-called "BH processing" should take almost no
time.
Further, if some other interrupt handler makes a BH active, then upon
return from that handler BH processing will be done, and bh_active=0.
So a subsequent interrupt which doesn't fiddle with BH's will not
hanve any BH's to service.

So why is calling do_bottom_half() unconditionally considered a bad
thing by some? I don't see the logic.

In any case, I note that 2.1.122 unconditionally calls
do_bottom_half() after interrupts. So if the only remaining
distinction is that SA_INTERRUPT globally disables interrupts, why not
just remove that feature and fix broken drivers which expect/depend
interrupts to be globally disabled?

It seems to me that we don't even need a return value from interrupt
handlers to say "don't run BH's", since if no BH is marked active, the
check is quite cheap anyway.

Regards,

Richard....

-
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/