]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()
authorEric Dumazet <edumazet@google.com>
Sat, 31 Mar 2018 20:16:26 +0000 (13:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 18:08:21 +0000 (14:08 -0400)
commitbe7abb1b3133e4db58c03d64fb0e7bd91321f6e9
tree253468761ee8e0f7a7cd97f21c24ef3c841529e7
parenta878e1bad89d533986df744d4cdc722e4e565132
ipv6: factorize sk_wmem_alloc updates done by __ip6_append_data()

While testing my inet defrag changes, I found that the senders
could spend ~20% of cpu cycles in skb_set_owner_w() updating
sk->sk_wmem_alloc for every fragment they cook, competing
with TX completion of prior skbs possibly happening on another cpus.

The solution to this problem is to use alloc_skb() instead
of sock_wmalloc() and manually perform a single sk_wmem_alloc change.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c