diff options
author | Eric Dumazet <edumazet@google.com> | 2016-12-08 20:41:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 04:12:21 +0100 |
commit | 6b229cf77d683f634f0edd876c6d1015402303ad (patch) | |
tree | ec877d3e324da74f7bbb179d4cd4a8db0172865c /net/ipv4/tcp_output.c | |
parent | udp: copy skb->truesize in the first cache line (diff) | |
download | linux-6b229cf77d683f634f0edd876c6d1015402303ad.tar.xz linux-6b229cf77d683f634f0edd876c6d1015402303ad.zip |
udp: add batching to udp_rmem_release()
If udp_recvmsg() constantly releases sk_rmem_alloc
for every read packet, it gives opportunity for
producers to immediately grab spinlocks and desperatly
try adding another packet, causing false sharing.
We can add a simple heuristic to give the signal
by batches of ~25 % of the queue capacity.
This patch considerably increases performance under
flood by about 50 %, since the thread draining the queue
is no longer slowed by false sharing.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions