netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about __alloc_skb() speedup
@ 2010-12-03 10:14 Junchang Wang
  2010-12-03 10:50 ` Eric Dumazet
  0 siblings, 1 reply; 7+ messages in thread
From: Junchang Wang @ 2010-12-03 10:14 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

Hi Eric,

I'm reading your patch (ec7d2f2cf3a1 __alloc_skb() speedup),
in which you prefetch skb and the shinfo part. I'm very
curious why we don't prefetch skb->data. It seems that will
help tx path a lot.

I added the following code

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 104f844..c60a808 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -222,6 +222,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
 
 		child->fclone = SKB_FCLONE_UNAVAILABLE;
 	}
+	prefetchw(data);
+
 out:
 	return skb;
 nodata:

and the pktgen in my server (A Intel SR1625 server with two E5530 
4-core processors and a single ixgbe-based NIC) goes from 7.6Mpps to
8.4Mpps (64 byte), with 10% performance gain.

For rx path, I did experiments on both ixgbe and igb with pktgen+kute,
and there is no change in system performance.

welcome any suggestions and corrections.

Thanks.

--Junchang

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-05 16:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 10:14 Question about __alloc_skb() speedup Junchang Wang
2010-12-03 10:50 ` Eric Dumazet
2010-12-04 14:18   ` Junchang Wang
2010-12-04 14:47     ` Eric Dumazet
2010-12-04 14:49       ` Eric Dumazet
2010-12-05 10:56       ` Junchang Wang
2010-12-05 16:49         ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).