From: Paolo Abeni <pabeni@redhat.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jonathan Corbet <corbet@lwn.net>, Shuah Khan <shuah@kernel.org>
Subject: [PATCH v4 net-next 0/4] net: introduce rps_default_mask
Date: Tue, 7 Feb 2023 19:44:54 +0100 [thread overview]
Message-ID: <cover.1675789134.git.pabeni@redhat.com> (raw)
Real-time setups try hard to ensure proper isolation between time
critical applications and e.g. network processing performed by the
network stack in softirq and RPS is used to move the softirq
activity away from the isolated core.
If the network configuration is dynamic, with netns and devices
routinely created at run-time, enforcing the correct RPS setting
on each newly created device allowing to transient bad configuration
became complex.
Additionally, when multi-queue devices are involved, configuring rps
in user-space on each queue easily becomes very expensive, e.g.
some setups use veths with per cpu queues.
These series try to address the above, introducing a new
sysctl knob: rps_default_mask. The new sysctl entry allows
configuring a netns-wide RPS mask, to be enforced since receive
queue creation time without any fourther per device configuration
required.
Additionally, a simple self-test is introduced to check the
rps_default_mask behavior.
v3 -> v4:
- fix build warning
v2 -> v3:
- reduce code duplication
- rebased
Paolo Abeni (4):
net-sysctl: factor out cpumask parsing helper
net-sysctl: factor-out rpm mask manipulation helpers
net: introduce default_rps_mask netns attribute
self-tests: introduce self-tests for RPS default mask
Documentation/admin-guide/sysctl/net.rst | 6 ++
include/linux/netdevice.h | 1 +
net/core/dev.h | 2 +
net/core/net-sysfs.c | 79 +++++++++++-------
net/core/sysctl_net_core.c | 81 ++++++++++++++-----
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/config | 3 +
.../testing/selftests/net/rps_default_mask.sh | 57 +++++++++++++
8 files changed, 182 insertions(+), 48 deletions(-)
create mode 100755 tools/testing/selftests/net/rps_default_mask.sh
--
2.39.1
next reply other threads:[~2023-02-07 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 18:44 Paolo Abeni [this message]
2023-02-07 18:44 ` [PATCH v4 net-next 1/4] net-sysctl: factor out cpumask parsing helper Paolo Abeni
2023-02-08 11:37 ` Simon Horman
2023-02-07 18:44 ` [PATCH v4 net-next 2/4] net-sysctl: factor-out rpm mask manipulation helpers Paolo Abeni
2023-02-08 11:37 ` Simon Horman
2023-02-07 18:44 ` [PATCH v4 net-next 3/4] net: introduce default_rps_mask netns attribute Paolo Abeni
2023-02-08 11:38 ` Simon Horman
2023-02-07 18:44 ` [PATCH v4 net-next 4/4] self-tests: introduce self-tests for RPS default mask Paolo Abeni
2023-02-08 11:38 ` Simon Horman
2023-02-09 11:25 ` [PATCH v4 net-next 0/4] net: introduce rps_default_mask Eric Dumazet
2023-02-10 2:00 ` patchwork-bot+netdevbpf
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.1675789134.git.pabeni@redhat.com \
--to=pabeni@redhat.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shuah@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).