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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJdpMQe9M-ubvc1bZm+KFdpOOL_EPmyhUjka82L8YJpDw@mail.gmail.com>
Date: Thu, 15 Jan 2026 12:35:10 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, netdev@...r.kernel.org, eric.dumazet@...il.com, 
	"David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next] net: inline napi_skb_cache_get()

On Thu, Jan 15, 2026 at 12:29 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> 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@...gle.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.

Yes, I saw mm/slub.c was using __fastpath_inline, but conditional to
CONFIG_SLUB_TINY,
and forcing __always_inline

#ifndef CONFIG_SLUB_TINY
#define __fastpath_inline __always_inline
#else
#define __fastpath_inline
#endif

(For some reason clang is not very smart at compiling mm/slub.c, I am
preparing a series to help with that)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ