瀏覽代碼

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>
Eric Dumazet 13 年之前
父節點
當前提交
e4cbb02a10
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/core/sock.c

+ 1 - 0
net/core/sock.c

@@ -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);