]> git.baikalelectronics.ru Git - kernel.git/commit
udp: copy skb->truesize in the first cache line
authorEric Dumazet <edumazet@google.com>
Thu, 8 Dec 2016 19:41:55 +0000 (11:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Dec 2016 03:12:21 +0000 (22:12 -0500)
commita9d9839f7b0943ff6c29a0881c6f6acf4cec0cb2
tree000d71e4f8d508764105d9e4d8b20ff86c5b9eab
parent66ee790f2258d8428232376df3420a030c7ca8df
udp: copy skb->truesize in the first cache line

In UDP RX handler, we currently clear skb->dev before skb
is added to receive queue, because device pointer is no longer
available once we exit from RCU section.

Since this first cache line is always hot, lets reuse this space
to store skb->truesize and thus avoid a cache line miss at
udp_recvmsg()/udp_skb_destructor time while receive queue
spinlock is held.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/ipv4/udp.c