[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230412065408.59e02bb7@kernel.org>
Date: Wed, 12 Apr 2023 06:54:08 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, alexander.duyck@...il.com, hkallweit1@...il.com,
andrew@...n.ch, willemb@...gle.com, michael.chan@...adcom.com,
jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com
Subject: Re: [PATCH net-next v3 7/7] net: piggy back on the memory barrier
in bql when waking queues
On Wed, 12 Apr 2023 14:06:34 +0800 Herbert Xu wrote:
> On Thu, Apr 06, 2023 at 05:41:40PM -0700, Jakub Kicinski wrote:
> > I wanted to keep the same semantics as netdev_tx_completed_queue()
> > which only barriers if (bytes). Not in the least to make it obvious
> > to someone looking at the code of netdev_txq_completed_mb() (and not
> > the comment above it) that it doesn't _always_ put a barrier in.
>
> OK, but I think we should instead change netdev_tx_compelted_queue
> to do the smp_mb unconditionally. We should never optimise for the
> unlikely case, and it is extremely unlikely for a TX cleanup routine
> to wind up with nothing to do.
I don't understand what you're trying to argue. The whole point of
the patch is to use the BQL barrier and BQL returns early, before
the barrier.
I don't think many people actually build kernels with BQL=n so the other
branch is more *documentation* than it is relevant, executed code.
Powered by blists - more mailing lists