[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+94vKLZ9ijgf+vzVcoBV4fNo3z1aF_Djbr-kC65qxzZA@mail.gmail.com>
Date: Fri, 21 Apr 2023 16:06:12 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next 5/5] net: optimize napi_threaded_poll() vs RPS/RFS
On Fri, Apr 21, 2023 at 3:10 PM Paolo Abeni <pabeni@...hat.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@...gle.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()
We could use a bit mask with 2 bits, but I am not sure it will help readability.
Powered by blists - more mailing lists