]> git.baikalelectronics.ru Git - kernel.git/commit
udp: avoid a cache miss on dequeue
authorPaolo Abeni <pabeni@redhat.com>
Mon, 12 Jun 2017 09:23:42 +0000 (11:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jun 2017 14:01:29 +0000 (10:01 -0400)
commit32d0c6b9f3755dbf5dd5206d77ab37835e228473
tree87152851619730150299fe4acf3a7a0eff8a6f4b
parent6715a89c6ad269a55c486c4641dd476b9f0e6b2b
udp: avoid a cache miss on dequeue

Since UDP no more uses sk->destructor, we can clear completely
the skb head state before enqueuing. Amend and use
skb_release_head_state() for that.

All head states share a single cacheline, which is not
normally used/accesses on dequeue. We can avoid entirely accessing
such cacheline implementing and using in the UDP code a specialized
skb free helper which ignores the skb head state.

This saves a cacheline miss at skb deallocation time.

v1 -> v2:
  replaced secpath_reset() with skb_release_head_state()

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