net: add a prefetch in socket backlog processing
authorEric Dumazet <edumazet@google.com>
Mon, 30 Apr 2012 16:07:09 +0000 (16:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 May 2012 13:39:48 +0000 (09:39 -0400)
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>
net/core/sock.c

index 836bca6485f5c02bc5d47bcce489f02c968e725a..1a8835117fd680b68d812f465fd1d14e92881ce1 100644 (file)
@@ -1700,6 +1700,7 @@ static void __release_sock(struct sock *sk)
                do {
                        struct sk_buff *next = skb->next;
 
+                       prefetch(next);
                        WARN_ON_ONCE(skb_dst_is_noref(skb));
                        skb->next = NULL;
                        sk_backlog_rcv(sk, skb);