diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-10-20 19:48:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-10-24 10:52:50 +0100 |
commit | 8a3854c7b8e4532063b14bed34115079b7d0cb36 (patch) | |
tree | cd84d6b901d6d1e14185481909982e4f267cd512 /arch/x86/virt | |
parent | a5ef058dc4d9a3e60d1808a0700e18e0e37e408e (diff) |
udp: track the forward memory release threshold in an hot cacheline
When the receiver process and the BH runs on different cores,
udp_rmem_release() experience a cache miss while accessing sk_rcvbuf,
as the latter shares the same cacheline with sk_forward_alloc, written
by the BH.
With this patch, UDP tracks the rcvbuf value and its update via custom
SOL_SOCKET socket options, and copies the forward memory threshold value
used by udp_rmem_release() in a different cacheline, already accessed by
the above function and uncontended.
Since the UDP socket init operation grown a bit, factor out the common
code between v4 and v6 in a shared helper.
Overall the above give a 10% peek throughput increase under UDP flood.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/virt')
0 files changed, 0 insertions, 0 deletions