[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef56d023-6ee3-41e1-bdcd-6d7cd30e9f91@redhat.com>
Date: Thu, 5 Jun 2025 10:15:41 +0200
From: David Hildenbrand <david@...hat.com>
To: Richard Chang <richardycc@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Martin Liu <liumartin@...gle.com>, Minchan Kim <minchan@...nel.org>,
Kalesh Singh <kaleshsingh@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/cma: pairing the trace_cma_alloc_start/finish
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@...gle.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@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists