[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260115200653.6afa6149@kernel.org>
Date: Thu, 15 Jan 2026 20:06:53 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni
<pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] net: split kmalloc_reserve()
On Wed, 14 Jan 2026 21:28:40 +0000 Eric Dumazet wrote:
> kmalloc_reserve() is too big to be inlined.
>
> Put the slow path in a new out-of-line function : kmalloc_pfmemalloc()
>
> Then let kmalloc_reserve() set skb->pfmemalloc only when/if
> the slow path is taken.
>
> This means __alloc_skb() is faster :
>
> - kmalloc_reserve() is now automatically inlined by both gcc and clang.
> - No more expensive RMW (skb->pfmemalloc = pfmemalloc).
> - No more expensive stack canary (for CONFIG_STACKPROTECTOR_STRONG=y).
> - Removal of two prefetches that were coming too late for modern cpus.
>
> Text size increase is quite small compared to the cpu savings (~0.5 %)
Could you resend? Looks like this depends on some of the patches that
were pending so it didn't apply when posted.
--
pw-bot: cr
Powered by blists - more mailing lists