From: Felix Fietkau <nbd@nbd.name>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net/core: add optional threading for backlog processing
Date: Sat, 25 Mar 2023 06:42:43 +0100 [thread overview]
Message-ID: <2ef8ab92-3670-61a1-384d-b827865447ca@nbd.name> (raw)
In-Reply-To: <20230324201951.75eabe1f@kernel.org>
On 25.03.23 04:19, Jakub Kicinski wrote:
> On Fri, 24 Mar 2023 18:57:03 +0100 Felix Fietkau wrote:
>> >> It can basically be used to make RPS a bit more dynamic and
>> >> configurable, because you can assign multiple backlog threads to a set
>> >> of CPUs and selectively steer packets from specific devices / rx queues
>> >
>> > Can you give an example?
>> >
>> > With the 4 CPU example, in case 2 queues are very busy - you're trying
>> > to make sure that the RPS does not end up landing on the same CPU as
>> > the other busy queue?
>>
>> In this part I'm thinking about bigger systems where you want to have a
>> group of CPUs dedicated to dealing with network traffic without
>> assigning a fixed function (e.g. NAPI processing or RPS target) to each
>> one, allowing for more dynamic processing.
>
> I tried the threaded NAPI on larger systems and helped others try,
> and so far it's not been beneficial :( Even the load balancing
> improvements are not significant enough to use it, and there
> is a large risk of scheduler making the wrong decision.
>
> Hence my questioning - I'm trying to understand what you're doing
> differently.
I didn't actually run any tests on bigger systems myself, so I don't
know how to tune it for those.
>> >> to them and allow the scheduler to take care of the rest.
>> >
>> > You trust the scheduler much more than I do, I think :)
>>
>> In my tests it brings down latency (both avg and p99) considerably in
>> some cases. I posted some numbers here:
>> https://lore.kernel.org/netdev/e317d5bc-cc26-8b1b-ca4b-66b5328683c4@nbd.name/
>
> Could you provide the full configuration for this test?
> In non-threaded mode the RPS is enabled to spread over remaining
> 3 cores?
In this test I'm using threaded NAPI and backlog_threaded without any
fixed core assignment.
- Felix
next prev parent reply other threads:[~2023-03-25 5:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 17:13 [PATCH net-next] net/core: add optional threading for backlog processing Felix Fietkau
2023-03-24 17:20 ` Jakub Kicinski
2023-03-24 17:35 ` Felix Fietkau
2023-03-24 17:47 ` Jakub Kicinski
2023-03-24 17:57 ` Felix Fietkau
2023-03-25 3:19 ` Jakub Kicinski
2023-03-25 5:42 ` Felix Fietkau [this message]
2023-03-28 2:06 ` Jakub Kicinski
2023-03-28 9:46 ` Felix Fietkau
2023-03-28 9:29 ` Paolo Abeni
2023-03-28 9:45 ` Felix Fietkau
2023-03-28 15:13 ` Paolo Abeni
2023-03-28 15:21 ` Felix Fietkau
2023-03-29 16:14 ` Jesper Dangaard Brouer
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=2ef8ab92-3670-61a1-384d-b827865447ca@nbd.name \
--to=nbd@nbd.name \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).