[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAkDRg0Ajl3ByXMq@slm.duckdns.org>
Date: Wed, 23 Apr 2025 05:12:06 -1000
From: Tejun Heo <tj@...nel.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, gaoxu <gaoxu2@...or.com>,
Dennis Zhou <dennis@...nel.org>, Christoph Lameter <cl@...ux.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
yipengxiang <yipengxiang@...or.com>
Subject: Re: mm: percpu: increase PERCPU_MODULE_RESERVE to avoid allocation
failure
On Tue, Apr 22, 2025 at 05:19:31PM -0700, Suren Baghdasaryan wrote:
...
> Allocating this reserved area dynamically would be ideal. OTOH this
> change increases the area size from 64kb to 128kb. Don't know how much
> effort we should put into it.
The easiest solution would be switching the modules to use alloc_percpu()
instead of declaring per-cpu variables statically. I couldn't think of a
better way to support static percpu variables in modules and still can't,
but there aren't noticeable downsides to using dynamically allocated percpu
variables, so if you have several bytes here and there, sure, declare them
statically, but for anything chunky, please use dynamic allocations.
Thanks.
--
tejun
Powered by blists - more mailing lists