summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-12-05 09:57:19 -0800
committerDavid S. Miller <davem@davemloft.net>2016-12-06 10:41:49 -0500
commita297569fe00a8fae18547061d355c45ef191b483 (patch)
tree6da37334eacf68c6d214d41e810eaa251a7708be /drivers/bus
parente466af66c768a2a89f5359fdb330b93da799cc55 (diff)
downloadlinux-stable-a297569fe00a8fae18547061d355c45ef191b483.tar.gz
linux-stable-a297569fe00a8fae18547061d355c45ef191b483.tar.bz2
linux-stable-a297569fe00a8fae18547061d355c45ef191b483.zip
net/udp: do not touch skb->peeked unless really needed
In UDP recvmsg() path we currently access 3 cache lines from an skb while holding receive queue lock, plus another one if packet is dequeued, since we need to change skb->next->prev 1st cache line (contains ->next/prev pointers, offsets 0x00 and 0x08) 2nd cache line (skb->len & skb->peeked, offsets 0x80 and 0x8e) 3rd cache line (skb->truesize/users, offsets 0xe0 and 0xe4) skb->peeked is only needed to make sure 0-length packets are properly handled while MSG_PEEK is operated. I had first the intent to remove skb->peeked but the "MSG_PEEK at non-zero offset" support added by Sam Kumar makes this not possible. This patch avoids one cache line miss during the locked section, when skb->len and skb->peeked do not have to be read. It also avoids the skb_set_peeked() cost for non empty UDP datagrams. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/bus')
0 files changed, 0 insertions, 0 deletions