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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251115014810.79376-1-sj@kernel.org>
Date: Fri, 14 Nov 2025 17:48:09 -0800
From: SeongJae Park <sj@...nel.org>
To: Jean Delvare <jdelvare@...e.de>
Cc: SeongJae Park <sj@...nel.org>,
	linux-mm@...ck.org,
	LKML <linux-kernel@...r.kernel.org>,
	David Hildenbrand <david@...hat.com>,
	Oscar Salvador <osalvador@...e.de>
Subject: Re: [RFC PATCH] mm/cma: Inline cma_sysfs counter hooks

On Fri, 14 Nov 2025 11:03:01 +0100 Jean Delvare <jdelvare@...e.de> wrote:

> Move cma_sysfs counter hooks from cma_sysfs.c to inline functions in
> cma.h. These one-liner functions are only used once each, but the
> compiler currently can't inline them because they are defined in one
> object and used in another. Letting the compiler inline these
> functions lowers the footprint and runtime cost of the sysfs interface
> to CMA stats even more.
> 
> Signed-off-by: Jean Delvare <jdelvare@...e.de>

Acked-by: SeongJae Park <sj@...nel.org>

> ---
> Applies on top of my previous patch due to a context change, but
> otherwise independent thereof.
> 
> On second thought, we might as well move these functions to cma.c as
> this is the only place where they are called, so it's hard to justify
> why they should be in a header file. Opinions?

I think that should also be nice.  In the case, I think it can drop 'inline'
keyword to let the compiler makes good decisions with its nice knowledge.  Also
the similar event accounting code such as count_vm_event() and trace_*() calls
can be moved into the new function together.  If do so, the function name may
also better to be updated to represent it is not only for cma sysfs but general
events accounting.  Just my two cents.


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ