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]
Message-ID: <da50974ca9a542b7a7c1596132ddffba6bb9d7af.camel@redhat.com>
Date:   Thu, 22 Sep 2022 22:21:33 +0200
From:   Paolo Abeni <pabeni@...hat.com>
To:     Alexander Duyck <alexander.duyck@...il.com>
Cc:     netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next] net: skb: introduce and use a single page frag
 cache

On Thu, 2022-09-22 at 18:29 +0200, Paolo Abeni wrote:
> On Wed, 2022-09-21 at 14:44 -0700, Alexander Duyck wrote:
> > On Wed, Sep 21, 2022 at 1:52 PM Paolo Abeni <pabeni@...hat.com> wrote:
> > > In that case we will still duplicate a bit of code  -
> > > this_cpu_ptr(&napi_alloc_cache) on both branches. gcc 11.3.1 here says
> > > that the generated code is smaller without this change.
> > 
> > Why do you need to duplicate it? 
> 
> The goal was using a single local variable to track the napi cache and
> the memory info. I thought ("was sure") that keeping two separate
> variables ('nc' and 'page_frag' instead of 'nc' and 'pfmemalloc') would
> produce the same amount of code. gcc says I'm wrong and you are right
> ;)
> 
> I'll use that in v2, thanks!

I'm sorry for being so noisy lately. I've to take back the above.
Before I measured the code size with for debug builds. With non debug
build the above schema does not reduce the instructions number.

I'll share the code after some more testing.

Cheers,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ