Re: [PATCH RFC]: napi_struct V4
From: "Michael Chan" <mchan@broadcom.com>
Date: 2007-07-26 06:33:19
From: "Michael Chan" <mchan@broadcom.com>
Date: 2007-07-26 06:33:19
David Miller wrote:
/* run TX completion thread */
if (sblk->idx[0].tx_consumer != tp->tx_cons) {
- tg3_tx(tp);
+ netif_tx_lock(netdev);
+ __tg3_tx(tp);
+ netif_tx_unlock(netdev);This will lead to more and longer lock contentions between ->hard_start_xmit() and ->poll() in the normal fast path. Why do we need to widen the scope of netif_tx_lock() in this case? By not taking the netif_tx_lock() during tx completions until the last moment and only when necessary improves the performance substantially.