[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47BDC848.50607@cosmosbay.com>
Date: Thu, 21 Feb 2008 19:51:52 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
Hi David
This is an RFC, based on net-2.6 for convenience only.
Thank you
[RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
Loopback transmit function loopback_xmit() actually calls netif_rx() to
queue
a skb to the softnet queue, and arms a softirq so that this skb can be
handled later.
This has a cost on SMP, because we need to hold a reference on the
device, and free this
reference when softirq dequeues packet.
Following patch directly calls netif_receive_skb() and avoids lot of
atomic operations.
(atomic_inc(&dev->refcnt), set_and_set_bit(NAPI_STATE_SCHED, &n->state), ...
atomic_dec(&dev->refcnt)...), cache line ping-pongs on device refcnt,
but also softirq overhead.
This gives a nice boost on tbench for example (5 % on my machine)
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
View attachment "loopback_xmit.patch" of type "text/plain" (356 bytes)
Powered by blists - more mailing lists