Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	"David S. Miller" <davem@davemloft.net>,
	Shuah Khan <shuah@kernel.org>,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH net-next v2 0/3] net: introduce rps_default_mask
Date: Mon, 02 Nov 2020 15:27:51 -0800	[thread overview]
Message-ID: <33cde8903dbe09a8abda1cd2ae7a9d3fdc2bc5e8.camel@kernel.org> (raw)
In-Reply-To: <20201102145447.0074f272@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

On Mon, 2020-11-02 at 14:54 -0800, Jakub Kicinski wrote:
> On Fri, 30 Oct 2020 12:16:00 +0100 Paolo Abeni wrote:
> > 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.
> > 
> > These series try to address the above, introducing a new
> > sysctl knob: rps_default_mask. The new sysctl entry allows
> > configuring a systemwide RPS mask, to be enforced since receive 
> > queue creation time without any fourther per device configuration
> > required.
> > 

The whole thing can be replaced with a user daemon scripts that
monitors all newly created devices and assign to them whatever rps mask
(call it default).

So why do we need this special logic in kernel ? 

I am not sure about this, but if rps queues sysfs are available before
the netdev is up, then you can also use udevd to assign the rps masks
before such devices are even brought up, so you would avoid the race
conditions that you described, which are not really clear to me to be
honest.

> > Additionally, a simple self-test is introduced to check the 
> > rps_default_mask behavior.
> 
> RPS is disabled by default, the processing is going to happen
> wherever
> the IRQ is mapped, and one would hope that the IRQ is not mapped to
> the
> core where the critical processing runs.
> 
> Would you mind elaborating further on the use case?


  reply	other threads:[~2020-11-02 23:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 11:16 [PATCH net-next v2 0/3] net: introduce rps_default_mask Paolo Abeni
2020-10-30 11:16 ` [PATCH net-next v2 1/3] net/sysctl: factor-out netdev_rx_queue_set_rps_mask() helper Paolo Abeni
2020-10-30 11:16 ` [PATCH net-next v2 2/3] net/core: introduce default_rps_mask netns attribute Paolo Abeni
2020-10-30 11:16 ` [PATCH net-next v2 3/3] self-tests: introduce self-tests for RPS default mask Paolo Abeni
2020-11-02 22:54 ` [PATCH net-next v2 0/3] net: introduce rps_default_mask Jakub Kicinski
2020-11-02 23:27   ` Saeed Mahameed [this message]
2020-11-03 15:22   ` Paolo Abeni
2020-11-03 16:52     ` Jakub Kicinski
2020-11-04 17:36       ` Paolo Abeni
2020-11-04 18:18         ` Marcelo Tosatti
2020-11-04 19:42         ` Jakub Kicinski
2023-01-30  9:25           ` Paolo Abeni
2023-01-30 21:52             ` Jakub Kicinski

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=33cde8903dbe09a8abda1cd2ae7a9d3fdc2bc5e8.camel@kernel.org \
    --to=saeed@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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