From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next] net: inline napi_skb_cache_get()
Date: Thu, 15 Jan 2026 12:29:47 +0100 [thread overview]
Message-ID: <bc1b8d79-2229-486b-aea2-bbd71d1fc74f@redhat.com> (raw)
In-Reply-To: <20260112131515.4051589-1-edumazet@google.com>
On 1/12/26 2:15 PM, Eric Dumazet wrote:
> clang is inlining it already, gcc (14.2) does not.
>
> Small space cost (215 bytes on x86_64) but faster sk_buff allocations.
>
> $ scripts/bloat-o-meter -t net/core/skbuff.gcc.before.o net/core/skbuff.gcc.after.o
> add/remove: 0/1 grow/shrink: 4/1 up/down: 359/-144 (215)
> Function old new delta
> __alloc_skb 471 611 +140
> napi_build_skb 245 363 +118
> napi_alloc_skb 331 416 +85
> skb_copy_ubufs 1869 1885 +16
> skb_shift 1445 1413 -32
> napi_skb_cache_get 112 - -112
> Total: Before=59941, After=60156, chg +0.36%
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Not blocking this patch, but I'm wondering if we should consider
defining an 'inline_for_performance' macro for both documentation
purpose and to allow no inline for size-sensitive build.
Paolo
next prev parent reply other threads:[~2026-01-15 11:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 13:15 [PATCH net-next] net: inline napi_skb_cache_get() Eric Dumazet
2026-01-15 11:29 ` Paolo Abeni [this message]
2026-01-15 11:35 ` Eric Dumazet
2026-01-15 11:40 ` patchwork-bot+netdevbpf
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=bc1b8d79-2229-486b-aea2-bbd71d1fc74f@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--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