lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2023 10:31:50 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Jakub Kicinski <kuba@...nel.org>
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, Apr 12, 2023 at 06:54:08AM -0700, Jakub Kicinski wrote:
>
> 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'm saying that the smp_mb should be unconditional in all cases.
As it stands the only time when smp_mb will be skipped is when the
TX cleaner finds no work to do.  That's an extremely unlikely case
and there is no point in skipping the barrier just for that.

> 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.

No I'm not referring to BQL, I'm referring to bytes/pkts == 0.

Looking into the git history, the bytes == 0 check wasn't even
meant for the barrier as the barrier was added later.  So it
was simply there to make the BQL code function correctly.  All
we have to do is move the check around the BQL code and then
the smp_mb can be done unconditionally.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ