From: Eric Dumazet <[EMAIL PROTECTED]> Date: Wed, 24 Aug 2005 00:00:51 +0200
> I believe the tg3_tx() holds the tx_lock for too long, in the case > 200 or so skb are delivered > > Maybe adding a netif_stop_queue(dev) at the beginning of this > function would help ? Or adding yet another bit in to tell that one > qdisc_restart() is in flight.. The only thing truly expensive in tg3_tx() are the DMA unmaps on some platforms, particular if that platform uses an IOMMU. Unfortunately, you won't see the IOMMU unmapping overhead in the oprofile traces because the locking done by IOMMU layers must disable interrupts. Another idea, if the DMA unmapping isn't the main culprit, is to batch the freeing. As we walk through the TX entries, just add the SKB to a linked list maintained at the top level of the function. Then drop the lock and pass each SKB on the list to dev_kfree_skb() (do not forget to NULL out skb->next or you'll trigger debugging checks). A hybrid scheme would only hold the lock for a certain number of SKBs at a time, drop the lock and free the list, then regrab the lock and ACK some more entries, again and again until all finied TX'd frames are processed. In fact that might work quite well. - 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