Re: [PATCH net-next] sock: avoid dirtying incoming_cpu if not needed

2017-06-21 Thread David Miller
From: Paolo Abeni Date: Wed, 21 Jun 2017 11:45:31 +0200 > for connected socket, the incoming_cpu field in the sock struct > is not going to change frequently, but we are setting it > unconditionally for each packet. > > Since sk_incoming_cpu and sk_flags share the same cacheline, > and the latte

[PATCH net-next] sock: avoid dirtying incoming_cpu if not needed

2017-06-21 Thread Paolo Abeni
for connected socket, the incoming_cpu field in the sock struct is not going to change frequently, but we are setting it unconditionally for each packet. Since sk_incoming_cpu and sk_flags share the same cacheline, and the latter is access by udp_recvmsg(), this cause a cache miss for each packet