mm: cma: print cma name as well in cma_alloc debug
authorPintu Kumar <quic_pintu@quicinc.com>
Thu, 6 Jul 2023 18:33:34 +0000 (00:03 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:12 +0000 (10:12 -0700)
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.

Link: https://lkml.kernel.org/r/1688668414-12350-1-git-send-email-quic_pintu@quicinc.com
Signed-off-by: Pintu Kumar <quic_pintu@quicinc.com>
Signed-off-by: Pintu Agarwal <pintu.ping@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/cma.c

index a4cfe99..4880f72 100644 (file)
--- 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;