Skip to content

UDP sock_wfree optimisations

Pavel Begunkov lkml netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3sock: dedup sock_def_write_space wmem_alloc checksnet/core/sock.c+2 -30 repliesApplied
2/3sock: optimise UDP sock_wfree() refcountingnet/core/sock.c+14 -00 repliesApplied
3/3sock: optimise sock_def_write_space barriersnet/core/sock.c+25 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/3] UDP sock_wfree optimisations

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/[email protected]/

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(-)
Signature · 1 line
2.36.0