Re: [PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-21 Thread Eric Dumazet
On Mon, 2016-11-21 at 14:01 -0800, Eric Dumazet wrote: > Tested-by: Paolo Abeni > > Thanks Paolo > > Note that udp6_recvmsg() hits the 3rd cache line of skb to access > skb->protocol : > > is_udp4 = (skb->protocol == htons(ETH_P_IP)); > > We might some trick to avoid this

Re: [PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-21 Thread Eric Dumazet
On Mon, 2016-11-21 at 22:36 +0100, Paolo Abeni wrote: > Nice catch, thank you Eric! > > This gives up to 8% speed-up in my performance test (wire speed udp flood > with small packets) > > Tested-by: Paolo Abeni Thanks Paolo Note that udp6_recvmsg() hits the 3rd cache line

Re: [PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-21 Thread Paolo Abeni
On Fri, 2016-11-18 at 17:18 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > UDP_SKB_CB(skb)->partial_cov is located at offset 66 in skb, > requesting a cold cache line being read in cpu cache. > > We can avoid this cache line miss for UDP sockets, > as partial_cov has a

Re: [PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-21 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Nov 2016 17:18:03 -0800 > From: Eric Dumazet > > UDP_SKB_CB(skb)->partial_cov is located at offset 66 in skb, > requesting a cold cache line being read in cpu cache. > > We can avoid this cache line miss for UDP

[PATCH net-next] udp: avoid one cache line miss in recvmsg()

2016-11-18 Thread Eric Dumazet
From: Eric Dumazet UDP_SKB_CB(skb)->partial_cov is located at offset 66 in skb, requesting a cold cache line being read in cpu cache. We can avoid this cache line miss for UDP sockets, as partial_cov has a meaning only for UDPLite. Signed-off-by: Eric Dumazet