Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 5/5] net: optimize napi_threaded_poll() vs RPS/RFS
Date: Fri, 21 Apr 2023 17:21:42 +0200	[thread overview]
Message-ID: <cb01d9cacd8631aaf05a22fe7e9a8662ef875ce4.camel@redhat.com> (raw)
In-Reply-To: <CANn89i+94vKLZ9ijgf+vzVcoBV4fNo3z1aF_Djbr-kC65qxzZA@mail.gmail.com>

On Fri, 2023-04-21 at 16:06 +0200, Eric Dumazet wrote:
> On Fri, Apr 21, 2023 at 3:10 PM Paolo Abeni <pabeni@redhat.com> wrote:
> > 
> > Hello,
> > 
> > thank you for the extremely fast turnaround!
> > 
> > On Fri, 2023-04-21 at 09:43 +0000, Eric Dumazet wrote:
> > > We use napi_threaded_poll() in order to reduce our softirq dependency.
> > > 
> > > We can add a followup of 821eba962d95 ("net: optimize napi_schedule_rps()")
> > > to further remove the need of firing NET_RX_SOFTIRQ whenever
> > > RPS/RFS are used.
> > > 
> > > Signed-off-by: Eric Dumazet <edumazet@google.com>
> > > ---
> > >  include/linux/netdevice.h |  3 +++
> > >  net/core/dev.c            | 12 ++++++++++--
> > >  2 files changed, 13 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > > index a6a3e9457d6cbc9fcbbde96b43b4b21878495403..08fbd4622ccf731daaee34ad99773d6dc2e82fa6 100644
> > > --- a/include/linux/netdevice.h
> > > +++ b/include/linux/netdevice.h
> > > @@ -3194,7 +3194,10 @@ struct softnet_data {
> > >  #ifdef CONFIG_RPS
> > >       struct softnet_data     *rps_ipi_list;
> > >  #endif
> > > +
> > >       bool                    in_net_rx_action;
> > > +     bool                    in_napi_threaded_poll;
> > 
> > If I'm correct only one of the above 2 flags can be set to true at any
> > give time. I'm wondering if could use a single flag (possibly with a
> > rename - say 'in_napi_polling')?
> 
> Well, we can _not_ use the same flag, because we do not want to
> accidentally enable
> the part in ____napi_schedule()

I see, thanks for the pointer.
> 
> We could use a bit mask with 2 bits, but I am not sure it will help readability.

Agreed, it's better to use 2 separate bool.

LGTM,

Acked-by: Paolo Abeni <pabeni@redhat.com>

(for pw's sake ;)



  reply	other threads:[~2023-04-21 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  9:43 [PATCH net-next 0/5] net: give napi_threaded_poll() some love Eric Dumazet
2023-04-21  9:43 ` [PATCH net-next 1/5] net: add debugging checks in skb_attempt_defer_free() Eric Dumazet
2023-04-21  9:43 ` [PATCH net-next 2/5] net: do not provide hard irq safety for sd->defer_lock Eric Dumazet
2023-04-21  9:43 ` [PATCH net-next 3/5] net: move skb_defer_free_flush() up Eric Dumazet
2023-04-21  9:43 ` [PATCH net-next 4/5] net: make napi_threaded_poll() aware of sd->defer_list Eric Dumazet
2023-04-21  9:43 ` [PATCH net-next 5/5] net: optimize napi_threaded_poll() vs RPS/RFS Eric Dumazet
2023-04-21 13:09   ` Paolo Abeni
2023-04-21 14:05     ` Jakub Kicinski
2023-04-21 14:06     ` Eric Dumazet
2023-04-21 15:21       ` Paolo Abeni [this message]
2023-04-23 12:50 ` [PATCH net-next 0/5] net: give napi_threaded_poll() some love 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=cb01d9cacd8631aaf05a22fe7e9a8662ef875ce4.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --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