aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-04-30 12:07:09 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-01 09:39:48 -0400
commite4cbb02a1070ebf0185f67a8887cc05f8a183d71 (patch)
tree5aa9604bf4b9040f41dbb04d548d3b4c71cd26ff /net/core
parent5dac94e109263e75ab7fe4e66ef88e9b49f500bf (diff)
net: add a prefetch in socket backlog processing
TCP or UDP stacks have big enough latencies that prefetching next pointer is worth it. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 836bca6485f5..1a8835117fd6 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1700,6 +1700,7 @@ static void __release_sock(struct sock *sk)
1700 do { 1700 do {
1701 struct sk_buff *next = skb->next; 1701 struct sk_buff *next = skb->next;
1702 1702
1703 prefetch(next);
1703 WARN_ON_ONCE(skb_dst_is_noref(skb)); 1704 WARN_ON_ONCE(skb_dst_is_noref(skb));
1704 skb->next = NULL; 1705 skb->next = NULL;
1705 sk_backlog_rcv(sk, skb); 1706 sk_backlog_rcv(sk, skb);