linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: SeongJae Park <sj@kernel.org>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	David Hildenbrand <david@redhat.com>,
	Oscar Salvador <osalvador@suse.de>
Subject: Re: [RFC PATCH] mm/cma: Inline cma_sysfs counter hooks
Date: Mon, 17 Nov 2025 11:49:50 +0100	[thread overview]
Message-ID: <20251117114950.73c1bddb@endymion> (raw)
In-Reply-To: <20251115014810.79376-1-sj@kernel.org>

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@suse.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


      reply	other threads:[~2025-11-17 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 10:03 Jean Delvare
2025-11-15  1:48 ` SeongJae Park
2025-11-17 10:49   ` Jean Delvare [this message]

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=20251117114950.73c1bddb@endymion \
    --to=jdelvare@suse.de \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=sj@kernel.org \
    /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