On Sat, Aug 05, 2006 at 12:56:42PM -0400, jamal wrote: > > > > 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.
This is exactly the scenario where the current code can fail. It is also exactly the one that my patch addresses. > I noticed that the e1000 in some cases returns NETDEV_TX_OK even when it > has stopped the queue. This results in wasted calls into the qdisc. Actually it's OK. qdisc_restart will return after each NETDEV_TX_OK and its caller will check netif_queue_stopped before calling it again. > > If we could avoid NETDEV_TX_BUSY et al. from happening, the idea is > > that we could eliminate all of the requeueing logic in the packet > > scheduler layer. It is a pipe dream from many years ago. > > Still doable IMO - maybe a motivation for something to experiment with > this long weekend. A precondition to eliminating it altogether is to eliminate lockless drivers which would be a very good thing :) In fact that reminds me, because tg3 is no longer lockless, we can do a nicer bug fix for it than e1000 (it has the same bug). Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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