public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] net: split kmalloc_reserve()
Date: Thu, 15 Jan 2026 20:06:53 -0800	[thread overview]
Message-ID: <20260115200653.6afa6149@kernel.org> (raw)
In-Reply-To: <20260114212840.2511487-1-edumazet@google.com>

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

  reply	other threads:[~2026-01-16  4:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 21:28 [PATCH net-next] net: split kmalloc_reserve() Eric Dumazet
2026-01-16  4:06 ` Jakub Kicinski [this message]
2026-01-16  4:10   ` Eric Dumazet

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=20260115200653.6afa6149@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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