Skip to content

Commit

Permalink
net: add a prefetch in socket backlog processing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 1, 2012
1 parent 5dac94e commit e4cbb02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e4cbb02

Please sign in to comment.