From: Ido Schimmel <idosch@nvidia.com>
To: Max Boone <mboone@akamai.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
Justin Iurman <justin.iurman@gmail.com>,
Andrea Mayer <andrea.mayer@uniroma2.it>,
Donald Sharp <sharpd@nvidia.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, Debabrata Banerjee <dbanerje@akamai.com>,
Nick Hudson <nhudson@akamai.com>
Subject: Re: [PATCH net-next] net: lwtunnel: use GFP_KERNEL in build_state paths
Date: Sun, 8 Nov 2026 16:21:07 +0200 [thread overview]
Message-ID: <20261108142107.GA1230892@shredder> (raw)
In-Reply-To: <20261106-build-state-use-gfp-kernel-v1-1-18084382f878@akamai.com>
On Fri, Nov 06, 2026 at 12:40:55PM +0100, Max Boone wrote:
> Since 3d25eabbbf67 ("ip_tunnel: Add dst_cache support in lwtunnel_state
> of ip tunnel"), build_state runs outside RCU and all its callers can
> sleep, but paths still use GFP_ATOMIC.
>
> For dst caches, that limits allocation to populated percpu pages. A
> large burst of SRv6 nexthops outruns the refill worker and will fail
> with -ENOMEM despite there being free memory:
>
> percpu: allocation failed, size=40 align=8 atomic=1, atomic alloc
> failed, no space left
>
> Batching 20000 RTM_NEWNEXTHOP under QEMU gave 10-109 failures per run
> before, none after.
>
> This commit converts the allocations reached through ops->build_state()
> and are called after the rcu_read_unlock():
>
> - ila_build_state(), ioam6_build_state(), rpl_build_state(),
> seg6_build_state(): build_state ops
> - bpf_parse_prog(): only called from bpf_build_state()
> - lwtunnel_state_alloc(): only called from build_state ops (also
> affects mpls, ip/ip6 tunnel, xfrmi and seg6_local)
>
> Signed-off-by: Max Boone <mboone@akamai.com>
> Reviewed-by: Debabrata Banerjee <dbanerje@akamai.com>
> Reviewed-by: Nick Hudson <nhudson@akamai.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
prev parent reply other threads:[~2026-11-08 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 11:40 Max Boone
2026-11-06 11:46 ` Boone, Max
2026-11-08 14:21 ` Ido Schimmel [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=20261108142107.GA1230892@shredder \
--to=idosch@nvidia.com \
--cc=andrea.mayer@uniroma2.it \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=dbanerje@akamai.com \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=justin.iurman@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mboone@akamai.com \
--cc=netdev@vger.kernel.org \
--cc=nhudson@akamai.com \
--cc=pabeni@redhat.com \
--cc=sharpd@nvidia.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
all inboxes | Powered by JetHome®