[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251117114950.73c1bddb@endymion>
Date: Mon, 17 Nov 2025 11:49:50 +0100
From: Jean Delvare <jdelvare@...e.de>
To: SeongJae Park <sj@...nel.org>
Cc: 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
Hi SeongJae,
On Fri, 14 Nov 2025 17:48:09 -0800, SeongJae Park wrote:
> On Fri, 14 Nov 2025 11:03:01 +0100 Jean Delvare <jdelvare@...e.de> wrote:
> > 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 for your feedback. I have prepared an alternative patch which
moves the code to cma.c, I'll post it shortly.
I also experimented with your idea of consolidating accounting. I'm not
totally sold to the idea though, structurally it's nicer, but it implies
scattering the ifdef SYSFS across all 3 accounting functions, which not
everybody may like. I'm really not sure which I prefer. I'll post it
and let the maintainers decide.
--
Jean Delvare
SUSE L3 Support
Powered by blists - more mailing lists