[openib-general] Re: LLTX and netif_stop_queue
jamal
hadi at cyberus.ca
Sun Dec 19 11:54:51 PST 2004
On Sun, 2004-12-19 at 14:31, jamal wrote:
> How about releasing the qlock only when the LLTX transmit lock is
> grabbed? That should bring it to par with what it was originally.
Something like two attached patches... one showing how to do it for
e1000. untested (not even compiled)
cheers,
jamal
-------------- next part --------------
--- a/net/sched/bak.sch_generic.c 2004-12-19 13:46:19.799356432 -0500
+++ b/net/sched/sch_generic.c 2004-12-19 13:49:14.384815408 -0500
@@ -128,12 +128,11 @@
}
/* Remember that the driver is grabbed by us. */
dev->xmit_lock_owner = smp_processor_id();
+ /* And release queue */
+ spin_unlock(&dev->queue_lock);
}
{
- /* And release queue */
- spin_unlock(&dev->queue_lock);
-
if (!netif_queue_stopped(dev)) {
int ret;
if (netdev_nit)
@@ -141,15 +140,14 @@
ret = dev->hard_start_xmit(skb, dev);
if (ret == NETDEV_TX_OK) {
+ dev->xmit_lock_owner = -1;
if (!nolock) {
- dev->xmit_lock_owner = -1;
spin_unlock(&dev->xmit_lock);
}
spin_lock(&dev->queue_lock);
return -1;
}
if (ret == NETDEV_TX_LOCKED && nolock) {
- spin_lock(&dev->queue_lock);
goto collision;
}
}
-------------- next part --------------
--- a/drivers/net/e1000/b.e1000_main.c 2004-12-19 13:50:59.481838232 -0500
+++ b/drivers/net/e1000/e1000_main.c 2004-12-19 13:53:34.326298296 -0500
@@ -1809,6 +1809,10 @@
return NETDEV_TX_LOCKED;
}
+ /* new from sch_generic for LLTX */
+ spin_unlock(&dev->queue_lock);
+ dev->xmit_lock_owner = smp_processor_id();
+
/* need: count + 2 desc gap to keep tail from touching
* head, otherwise try next time */
if(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2) {
More information about the general
mailing list