From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Pintu Kumar <quic_pintu@quicinc.com>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org
Cc: pintu.ping@gmail.com
Subject: Re: [PATCH v2] mm: cma: print cma name as well in cma_alloc debug
Date: Fri, 7 Jul 2023 15:57:42 +0530 [thread overview]
Message-ID: <26816f0a-7f55-f5ce-b71d-769011f9230f@arm.com> (raw)
In-Reply-To: <1688668414-12350-1-git-send-email-quic_pintu@quicinc.com>
On 7/7/23 00:03, Pintu Kumar wrote:
> CMA allocation can happen either from global cma or from
> dedicated cma region.
>
> Thus it is helpful to print cma name as well during initial
> debugging to confirm cma regions were getting initialized or not.
>
> Signed-off-by: Pintu Kumar <quic_pintu@quicinc.com>
> Signed-off-by: Pintu Agarwal <pintu.ping@gmail.com>
> ---
> mm/cma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index a4cfe99..4880f72 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -436,8 +436,8 @@ struct page *cma_alloc(struct cma *cma, unsigned long count,
> if (!cma || !cma->count || !cma->bitmap)
> goto out;
>
> - pr_debug("%s(cma %p, count %lu, align %d)\n", __func__, (void *)cma,
> - count, align);
> + pr_debug("%s(cma %p, name: %s, count %lu, align %d)\n", __func__,
> + (void *)cma, cma->name, count, align);
>
> if (!count)
> goto out;
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.
next prev parent reply other threads:[~2023-07-07 10:27 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 [this message]
2023-07-07 12:46 ` Matthew Wilcox
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=26816f0a-7f55-f5ce-b71d-769011f9230f@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--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