From: Eric Dumazet <[EMAIL PROTECTED]> Date: Wed, 24 Aug 2005 01:10:44 +0200
> Looking at tg3_tx() more closely, I am not convinced it really needs > to lock tp->tx_lock during the loop. tp->tx_cons (swidx) is changed > in this function only, and could be changed to an atomic_t > > The tx_lock would be needed for the final > > if (netif_queue_stopped(tp->dev) && > (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) > netif_wake_queue(tp->dev); If you're going to take the tx_lock anyways, no need to make the tx_cons atomic in any way. Just update it inside of that lock holding at the end. dev->poll() executes atomically, and that helps a lot here. Please toy around with some of these ideas and let us know what works well in your testing. Thanks. - 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