linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	gaoxu <gaoxu2@honor.com>, Dennis Zhou <dennis@kernel.org>,
	Christoph Lameter <cl@linux.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	yipengxiang <yipengxiang@honor.com>
Subject: Re: mm: percpu: increase PERCPU_MODULE_RESERVE to avoid allocation failure
Date: Wed, 23 Apr 2025 05:12:06 -1000	[thread overview]
Message-ID: <aAkDRg0Ajl3ByXMq@slm.duckdns.org> (raw)
In-Reply-To: <CAJuCfpF4SbPWMgECD89e=QDcrCTNqnchYZ=dpod-cdRxfsCtjA@mail.gmail.com>

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


  reply	other threads:[~2025-04-23 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 11:39 gaoxu
2025-04-23  0:02 ` Andrew Morton
2025-04-23  0:19   ` Suren Baghdasaryan
2025-04-23 15:12     ` Tejun Heo [this message]
2025-04-23 17:04       ` Suren Baghdasaryan
2025-04-23  1:17   ` Dennis Zhou

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=aAkDRg0Ajl3ByXMq@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=dennis@kernel.org \
    --cc=gaoxu2@honor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=surenb@google.com \
    --cc=yipengxiang@honor.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