From: David Hildenbrand <david@redhat.com>
To: Richard Chang <richardycc@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Liu <liumartin@google.com>,
Minchan Kim <minchan@kernel.org>,
Kalesh Singh <kaleshsingh@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/cma: pairing the trace_cma_alloc_start/finish
Date: Thu, 5 Jun 2025 10:15:41 +0200 [thread overview]
Message-ID: <ef56d023-6ee3-41e1-bdcd-6d7cd30e9f91@redhat.com> (raw)
In-Reply-To: <20250605072532.972081-1-richardycc@google.com>
On 05.06.25 09:25, Richard Chang wrote:
> In the bad input validation cases, there is no
> trace_cma_alloc_finish to match the trace_cma_alloc_start.
> Move the trace_cma_alloc_start event after the validations.
>
> Signed-off-by: Richard Chang <richardycc@google.com>
> ---
> mm/cma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index 397567883a10..bd3772773736 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -854,8 +854,6 @@ static struct page *__cma_alloc(struct cma *cma, unsigned long count,
> unsigned long i;
> const char *name = cma ? cma->name : NULL;
>
> - trace_cma_alloc_start(name, count, align);
> -
> if (!cma || !cma->count)
> return page;
>
> @@ -865,6 +863,8 @@ static struct page *__cma_alloc(struct cma *cma, unsigned long count,
> if (!count)
> return page;
>
> + trace_cma_alloc_start(name, count, align);
> +
> for (r = 0; r < cma->nranges; r++) {
> page = NULL;
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-06-05 8:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 7:25 Richard Chang
2025-06-05 8:15 ` David Hildenbrand [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=ef56d023-6ee3-41e1-bdcd-6d7cd30e9f91@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kaleshsingh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liumartin@google.com \
--cc=minchan@kernel.org \
--cc=richardycc@google.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