netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb()
@ 2017-06-22 13:01 Paolo Abeni
  2017-06-22 17:44 ` David Miller
  2017-06-22 20:49 ` Jesper Dangaard Brouer
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Abeni @ 2017-06-22 13:01 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller

very similar to commit dd99e425be23 ("udp: prefetch
rmem_alloc in udp_queue_rcv_skb()"), this allows saving a cache
miss when the BH is bottle-neck for UDP over ipv6 packet
processing, e.g. for small packets when a single RX NIC ingress
queue is in use.

Performances under flood when multiple NIC RX queues used are
unaffected, but when a single NIC rx queue is in use, this
gives ~8% performance improvement.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/ipv6/udp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 2b33847..d1d7288 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -630,6 +630,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
 		}
 	}
 
+	prefetch(&sk->sk_rmem_alloc);
 	if (rcu_access_pointer(sk->sk_filter) &&
 	    udp_lib_checksum_complete(skb))
 		goto csum_error;
-- 
2.9.4

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

end of thread, other threads:[~2017-06-22 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 13:01 [PATCH net-next] udp/v6: prefetch rmem_alloc in udp6_queue_rcv_skb() Paolo Abeni
2017-06-22 17:44 ` David Miller
2017-06-22 17:59   ` Paolo Abeni
2017-06-22 20:49 ` Jesper Dangaard Brouer

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).