[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250617075852._s0WQwZP@linutronix.de>
Date: Tue, 17 Jun 2025 09:58:52 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Gal Pressman <gal@...dia.com>, netdev@...r.kernel.org,
dev@...nvswitch.org, "David S. Miller" <davem@...emloft.net>,
Aaron Conole <aconole@...hat.com>,
Eelco Chaudron <echaudro@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Ilya Maximets <i.maximets@....org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net] openvswitch: Allocate struct ovs_pcpu_storage
dynamically
On 2025-06-16 15:09:02 [-0700], Jakub Kicinski wrote:
> On Fri, 13 Jun 2025 14:36:29 +0200 Sebastian Andrzej Siewior wrote:
> > PERCPU_MODULE_RESERVE defines the maximum size that can by used for the
> > per-CPU data size used by modules. This is 8KiB.
> >
> > Commit 035fcdc4d240c ("openvswitch: Merge three per-CPU structures into
> > one") restructured the per-CPU memory allocation for the module and
> > moved the separate alloc_percpu() invocations at module init time to a
> > static per-CPU variable which is allocated by the module loader.
>
> IIUC you're saying that the module loader only gets 8kB but dynamic
> allocations from the code don't have this restriction?
8KiB is for build time variables such as those defined by
DEFINE_PER_CPU(). The module loader uses __alloc_reserved_percpu() to
access this PERCPU_MODULE_RESERVE) storage.
Regular alloc_percpu() (at module init time or later ) does not have
this restriction.
> Maybe just me but TBH the commit message reads like the inverse :S
I can improve the message but I'm not sure how.
Sebastian
Powered by blists - more mailing lists