aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-03-22 08:56:39 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-23 21:57:38 -0400
commit472c2e07eef045145bc1493cc94a01c87140780a (patch)
treee1980ba54472857684241be387d8f25e561be901 /net/ipv4/af_inet.c
parentnet: convert rps_needed and rfs_needed to new static branch api (diff)
downloadlinux-dev-472c2e07eef045145bc1493cc94a01c87140780a.tar.xz
linux-dev-472c2e07eef045145bc1493cc94a01c87140780a.zip
tcp: add one skb cache for tx
On hosts with a lot of cores, RPC workloads suffer from heavy contention on slab spinlocks. 20.69% [kernel] [k] queued_spin_lock_slowpath 5.64% [kernel] [k] _raw_spin_lock 3.83% [kernel] [k] syscall_return_via_sysret 3.48% [kernel] [k] __entry_text_start 1.76% [kernel] [k] __netif_receive_skb_core 1.64% [kernel] [k] __fget For each sendmsg(), we allocate one skb, and free it at the time ACK packet comes. In many cases, ACK packets are handled by another cpus, and this unfortunately incurs heavy costs for slab layer. This patch uses an extra pointer in socket structure, so that we try to reuse the same skb and avoid these expensive costs. We cache at most one skb per socket so this should be safe as far as memory pressure is concerned. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
0 files changed, 0 insertions, 0 deletions