From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Subject: [RFC PATCH 0/3] udp: scalability improvements
Date: Sat, 6 May 2017 22:42:35 +0200 [thread overview]
Message-ID: <cover.1494103184.git.pabeni@redhat.com> (raw)
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(-)
--
2.9.3
next reply other threads:[~2017-05-06 20:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-06 20:42 Paolo Abeni [this message]
2017-05-06 20:42 ` [RFC PATCH 1/3] net/sock: factor out dequeue/peek with offset code Paolo Abeni
2017-05-06 20:42 ` [RFC PATCH 2/3] udp: use a separate rx queue for packet reception Paolo Abeni
2017-05-06 20:42 ` [RFC PATCH 3/3] udp: keep the sk_receive_queue held when splicing Paolo Abeni
2017-05-06 23:09 ` [RFC PATCH 0/3] udp: scalability improvements Tom Herbert
2017-05-08 7:29 ` Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1494103184.git.pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).