* Mike Smith <[EMAIL PROTECTED]> [011009 00:25] wrote:
> > * Kenneth D. Merry <[EMAIL PROTECTED]> [011009 00:11] wrote:
> > > 
> > > As you say above, this is actually a good thing.  I don't see how this ties
> > > into the patch to introduce some sort of interrupt coalescing into the
> > > ti(4) driver.   IMO, you should be able to tweak the coalescing parameters
> > > on the board to do what you want.
> > 
> > No matter how hard you tweak the board, an interrupt may still
> > trigger while you process a hardware interrupt, this causes an
> > additional poll which can cause additional coalescing.
> I don't think I understand what sort of crack you are smoking.
> If an interrupt-worthy condition is asserted on the board, you aren't 
> going to leave your typical interrupt handler anyway; this sort of 
> coalescing already happens without any "help".

After talking to you on IRC it's become obvious that this doesn't
exactly happen without help.  It's more of a side effect of the
way _some_ of the drivers are written.

What I understand from talking to you:
  Most smarter drivers or high performance ones will check if the
  tx/rx rings have been modified by the hardware and will consume
  those packets as well.

However, most drivers have code like this:

        if (ifp->if_flags & IFF_RUNNING) {
                /* Check RX return ring producer/consumer */

                /* Check TX ring producer/consumer */

Now if more packets come in while in ti_txeof() it seems that
you'll need to take an additional interrupt to get at them.

So Terry's code isn't wrong, but it's not as amazing as one
would initially think, it just avoids a race that can happen
while transmitting packets packets and more arrive or while
recieving packets and the transmit queue drains.

Now, when one is be doing a lot more work in the interrupt context
(or perhaps just running on a slower host processor), Terry's
patches make a lot more sense as there's a much larger window
available for this race.

The fact that receiving is done before transmitting (at least in
the 'ti' driver) makes it an even smaller race as you're less likely
to be performing a lengthy operation inside the tx routine than if
you were doing some magic in the rx routine with incomming packets.

Or at least that's how it seems to me.

Either way, no need to get your latex in a bunch Mike. :-)

-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to