]> git.baikalelectronics.ru Git - kernel.git/commit
udp: do rmem bulk free even if the rx sk queue is empty
authorPaolo Abeni <pabeni@redhat.com>
Tue, 19 Sep 2017 10:11:43 +0000 (12:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 21:28:52 +0000 (14:28 -0700)
commit4dc61cc8f2a7e2e41e15c6e3dc73326eccc9cfc8
tree26373be5bf2c3173f3eae9b0cbe69d5a083c1c0a
parenta7cb0cd8923a6b93f3290c395d782fb4ae24b58c
udp: do rmem bulk free even if the rx sk queue is empty

The commit 09aa8dd9d87c ("udp: add batching to udp_rmem_release()")
reduced greatly the cacheline contention between the BH and the US
reader batching the rmem updates in most scenarios.

Such optimization is explicitly avoided if the US reader is faster
then BH processing.

My fault, I initially suggested this kind of behavior due to concerns
of possible regressions with small sk_rcvbuf values. Tests showed
such concerns are misplaced, so this commit relaxes the condition
for rmem bulk updates, obtaining small but measurable performance
gain in the scenario described above.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c