linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Pintu Kumar <quic_pintu@quicinc.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	linux-mm@kvack.org, pintu.ping@gmail.com
Subject: Re: [PATCH v2] mm: cma: print cma name as well in cma_alloc debug
Date: Fri, 7 Jul 2023 13:46:26 +0100	[thread overview]
Message-ID: <ZKgJIlqZk8cw4MBa@casper.infradead.org> (raw)
In-Reply-To: <26816f0a-7f55-f5ce-b71d-769011f9230f@arm.com>

On Fri, Jul 07, 2023 at 03:57:42PM +0530, Anshuman Khandual wrote:
> LGTM, cma->name is an identifying attribute for the region for which the allocation
> request was made. But how about using cma_get_name() helper instead ? Very few call
> sites have been using the helper.

It's not really a "helper", is it?  The function name is longer than
its implementation.

cma_get_name(cma)
vs
cma->name

Plus there's the usual question about whether a "got" name needs to be
"put" (does it grab a refcount?)

I think it's useful that this function exists since it lets us not expose
struct cma outside of mm/, but it really should be called cma_name()
and I don't think we should be encouraging its use within cma.c.


  reply	other threads:[~2023-07-07 12:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 18:27 [PATCH] " Pintu Kumar
2023-07-06 18:33 ` [PATCH v2] " Pintu Kumar
2023-07-07 10:27   ` Anshuman Khandual
2023-07-07 12:46     ` Matthew Wilcox [this message]
2023-07-07 14:06       ` Pintu Agarwal
2023-07-07 14:09         ` Matthew Wilcox
2023-07-07 14:16           ` Pintu Agarwal
2023-07-07 14:22             ` Matthew Wilcox
2023-07-07 14:33               ` Pintu Agarwal
2023-07-08  6:52                 ` Pintu Agarwal
2023-07-12 14:02                   ` Pintu Agarwal

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=ZKgJIlqZk8cw4MBa@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pintu.ping@gmail.com \
    --cc=quic_pintu@quicinc.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