Skip to content

RFC udp: scalability improvements

Paolo Abeni netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net/sock: factor out dequeue/peek with offset codeinclude/linux/skbuff.h include/net/sock.h net/core/datagram.c+60 -410 replies
2/3udp: use a separate rx queue for packet receptioninclude/linux/udp.h include/net/udp.h include/net/udplite.h +2 more+131 -240 replies
3/3udp: keep the sk_receive_queue held when splicingnet/ipv4/udp.c+26 -100 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/3] udp: scalability improvements

This patch series implement an idea suggested by Eric Dumazet to reduce the contention of the udp sk_receive_queue lock when the socket is under flood.

An ancillary queue is added to the udp socket, and the socket always tries first to read packets from such queue. If it's empty, we splice the content from sk_receive_queue into the ancillary queue.

The first patch introduces some helpers to keep the udp code small, and the following two implement the ancillary queue strategy. The code is split to hopefully help the reviewing process.

The measured overall gain under udp flood is in the 20-35% range depending on the numa layout and the number of ingress queue used by the relevant nic.

On a single numa node host, the peak tput is now reached when the traffic targeting the udp socket uses multiple nic rx queues, while on current net-next the tput always decreases when moving from a single rx queue to multiple ones.

Paolo Abeni (3):
net/sock: factor out dequeue/peek with offset code
udp: use a separate rx queue for packet reception
udp: keep the sk_receive_queue held when splicing

 include/linux/skbuff.h |   7 +++
 include/linux/udp.h    |   3 +
 include/net/sock.h     |   4 +-
 include/net/udp.h      |   9 +--
 include/net/udplite.h  |   2 +-
 net/core/datagram.c    |  90 +++++++++++++++------------
 net/ipv4/udp.c         | 162 +++++++++++++++++++++++++++++++++++++++++++------
 net/ipv6/udp.c         |   3 +-
 8 files changed, 211 insertions(+), 69 deletions(-)
Signature · 1 line
2.9.3