mbox series

[net-next,0/3] UDP sock_wfree optimisations

Message ID cover.1650891417.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series UDP sock_wfree optimisations | expand

Message

Pavel Begunkov April 28, 2022, 10:58 a.m. UTC
The series is not UDP specific but that the main beneficiary. 2/3 saves one
atomic in sock_wfree() and on top 3/3 removes an extra barrier.
Tested with UDP over dummy netdev, 2038491 -> 2099071 req/s (or around +3%).

note: in regards to 1/3, there is a "Should agree with poll..." comment
that I don't completely get, and there is no git history to explain it.
Though I can't see how it could rely on having the second check without
racing with tasks woken by wake_up*().

The series was split from a larger patchset, see
https://lore.kernel.org/netdev/cover.1648981570.git.asml.silence@gmail.com/

Pavel Begunkov (3):
  sock: dedup sock_def_write_space wmem_alloc checks
  sock: optimise UDP sock_wfree() refcounting
  sock: optimise sock_def_write_space barriers

 net/core/sock.c | 43 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 40 insertions(+), 3 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 1, 2022, 12:20 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 28 Apr 2022 11:58:16 +0100 you wrote:
> The series is not UDP specific but that the main beneficiary. 2/3 saves one
> atomic in sock_wfree() and on top 3/3 removes an extra barrier.
> Tested with UDP over dummy netdev, 2038491 -> 2099071 req/s (or around +3%).
> 
> note: in regards to 1/3, there is a "Should agree with poll..." comment
> that I don't completely get, and there is no git history to explain it.
> Though I can't see how it could rely on having the second check without
> racing with tasks woken by wake_up*().
> 
> [...]

Here is the summary with links:
  - [net-next,1/3] sock: dedup sock_def_write_space wmem_alloc checks
    https://git.kernel.org/netdev/net-next/c/14bfee9b6270
  - [net-next,2/3] sock: optimise UDP sock_wfree() refcounting
    https://git.kernel.org/netdev/net-next/c/052ada096842
  - [net-next,3/3] sock: optimise sock_def_write_space barriers
    https://git.kernel.org/netdev/net-next/c/0a8afd9f026a

You are awesome, thank you!