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
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to