[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65205789.5d0a0220.7e49b.ccb0@mx.google.com>
Date: Fri, 6 Oct 2023 20:52:57 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>,
Paolo Abeni <pabeni@...hat.com>,
Chris Snook <chris.snook@...il.com>,
Raju Rangoju <rajur@...lsio.com>,
Jeroen de Borst <jeroendb@...gle.com>,
Praveen Kaligineedi <pkaligineedi@...gle.com>,
Shailend Chand <shailend@...gle.com>,
Douglas Miller <dougmill@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Nick Child <nnac123@...ux.ibm.com>,
Haren Myneni <haren@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>,
Dany Madden <danymadden@...ibm.com>,
Thomas Falcon <tlfalcon@...ux.ibm.com>,
Tariq Toukan <tariqt@...dia.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Krzysztof Halasa <khalasa@...p.pl>,
Kalle Valo <kvalo@...nel.org>,
Jeff Johnson <quic_jjohnson@...cinc.com>,
Gregory Greenman <gregory.greenman@...el.com>,
Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
Intel Corporation <linuxwwan@...el.com>,
Chiranjeevi Rapolu <chiranjeevi.rapolu@...ux.intel.com>,
Liu Haijun <haijun.liu@...iatek.com>,
M Chetan Kumar <m.chetan.kumar@...ux.intel.com>,
Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
Loic Poulain <loic.poulain@...aro.org>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
Johannes Berg <johannes@...solutions.net>,
Yuanjun Gong <ruc_gongyuanjun@....com>,
Simon Horman <horms@...nel.org>, Rob Herring <robh@...nel.org>,
Ziwei Xiao <ziweixiao@...gle.com>,
Rushil Gupta <rushilg@...gle.com>,
Coco Li <lixiaoyan@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Junfeng Guo <junfeng.guo@...el.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Wei Fang <wei.fang@....com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Yuri Karpov <YKarpov@...ras.ru>,
Zhengchao Shao <shaozhengchao@...wei.com>,
Andrew Lunn <andrew@...n.ch>,
Zheng Zengkai <zhengzengkai@...wei.com>,
Lee Jones <lee@...nel.org>,
Maximilian Luz <luzmaximilian@...il.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Dawei Li <set_pte_at@...look.com>,
Anjaneyulu <pagadala.yesu.anjaneyulu@...el.com>,
Benjamin Berg <benjamin.berg@...el.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-can@...r.kernel.org, netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, ath10k@...ts.infradead.org,
linux-wireless@...r.kernel.org
Subject: Re: [net-next PATCH v2 3/4] netdev: replace napi_reschedule with
napi_schedule
On Thu, Oct 05, 2023 at 06:41:03PM +0200, Eric Dumazet wrote:
> On Thu, Oct 5, 2023 at 6:32 PM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Thu, 5 Oct 2023 18:11:56 +0200 Eric Dumazet wrote:
> > > OK, but I suspect some users of napi_reschedule() might not be race-free...
> >
> > What's the race you're thinking of?
>
> This sort of thing... the race is in fl_starving() though...
>
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c
> b/drivers/net/ethernet/chelsio/cxgb4/sge.c
> index 98dd78551d89..b5ff2e1a9975 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
> @@ -4261,7 +4261,7 @@ static void sge_rx_timer_cb(struct timer_list *t)
>
> if (fl_starving(adap, fl)) {
> rxq = container_of(fl, struct sge_eth_rxq, fl);
> - if (napi_reschedule(&rxq->rspq.napi))
> + if (napi_schedule(&rxq->rspq.napi))
> fl->starving++;
> else
> set_bit(id, s->starving_fl);
Ehhh problem is that this is a simple rename so if any race is present,
it's already there and not caused by this rename :(
Don't know maybe this is out of scope and should be investigated with a
bug report?
Maybe this should be changed to prep/__schedule to prevent any kind of
race? But doing so doesn't prevent any kind of ""starving""?
--
Ansuel
Powered by blists - more mailing lists