lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJuCfpHSYz6-VtR2Q_44eEeCYb=rXcVApKiCZckQwU2X3eEa-A@mail.gmail.com>
Date: Wed, 23 Apr 2025 10:04:09 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Tejun Heo <tj@...nel.org>
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 Wed, Apr 23, 2025 at 8:12 AM Tejun Heo <tj@...nel.org> wrote:
>
> 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.

In case of allocation tags, we are trying to minimize performance
overhead as much as possible and allocating their per-cpu counters at
compile time is in line with that goal. I'll check how much overhead
dynamic allocation would add but it won't be zero.

>
> Thanks.
>
> --
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ