On Fri, 04 Aug 2006 10:28:52 -0700
"Michael Chan" <[EMAIL PROTECTED]> wrote:

> On Fri, 2006-08-04 at 20:10 +1000, Herbert Xu wrote:
> 
> > 1) netif_wake_queue is about to occur.  In this case it doesn't really
> > matter what we do as netif_wake_queue will always wake the queue for us.
> > In the worst case, it'll wake up the queue with too little room but that's
> > really uncommon and we can cope with that anyway.
> > 
> In a lot of other drivers including tg3, waking the tx queue when there
> is not enough room in the tx ring is considered a bug and will trigger a
> BUG message:
> 
> BUG! Tx Ring full when queue awake!
> 
> May be David can explain why it is undesirable to wake up the queue when
> it is full?

Because it means that there was a race hole in the normal sleep/wakeup code.
Some drivers just spin (see acenic.c) but that's ugly.

The real risk is that the transmit routine will decide it's busy, but
at the same time an IRQ on another CPU will clean up the whole ring
and make the queue available again. Then the transmit routine exits and
says its busy, and the higher level will decide it is permanently stopped.

-- 
Stephen Hemminger <[EMAIL PROTECTED]>
"And in the Packet there writ down that doome"
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to