Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next] net: skb: introduce and use a single page frag cache
Date: Thu, 22 Sep 2022 22:21:33 +0200	[thread overview]
Message-ID: <da50974ca9a542b7a7c1596132ddffba6bb9d7af.camel@redhat.com> (raw)
In-Reply-To: <791065bb090ffe08f170e91bd7fabe0a5660ab53.camel@redhat.com>

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


      reply	other threads:[~2022-09-22 20:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 16:41 [PATCH net-next] net: skb: introduce and use a single page frag cache Paolo Abeni
2022-09-21 17:18 ` Eric Dumazet
2022-09-21 18:10   ` Paolo Abeni
2022-09-21 18:11 ` Alexander H Duyck
2022-09-21 19:33   ` Paolo Abeni
2022-09-21 20:21     ` Paolo Abeni
2022-09-21 20:23     ` Alexander H Duyck
2022-09-21 20:51       ` Paolo Abeni
2022-09-21 21:44         ` Alexander Duyck
2022-09-22 16:29           ` Paolo Abeni
2022-09-22 20:21             ` Paolo Abeni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da50974ca9a542b7a7c1596132ddffba6bb9d7af.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox