* [merged] mm-cma-improve-pr_debug-log-in-cma_release.patch removed from -mm tree
@ 2020-12-15 23:23 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-15 23:23 UTC (permalink / raw)
To: charante, david, iamjoonsoo.kim, jrdr.linux, mm-commits, vbabka,
vinmenon
The patch titled
Subject: mm: cma: improve pr_debug log in cma_release()
has been removed from the -mm tree. Its filename was
mm-cma-improve-pr_debug-log-in-cma_release.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Charan Teja Reddy <charante@codeaurora.org>
Subject: mm: cma: improve pr_debug log in cma_release()
It is required to print 'count' of pages, along with the pages, passed to
cma_release to debug the cases of mismatched count value passed between
cma_alloc() and cma_release() from a code path.
As an example, consider the below scenario:
1) CMA pool size is 4MB and
2) User doing the erroneous step of allocating 2 pages but freeing 1
page in a loop from this CMA pool. The step 2 causes cma_alloc() to
return NULL at one point of time because of -ENOMEM condition.
And the current pr_debug logs is not giving the info about these types of
allocation patterns because of count value not being printed in
cma_release().
We are printing the count value in the trace logs, just extend the same to
pr_debug logs too.
[akpm@linux-foundation.org: fix printk warning]
Link: https://lkml.kernel.org/r/1606318341-29521-1-git-send-email-charante@codeaurora.org
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Reviewed-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/cma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/cma.c~mm-cma-improve-pr_debug-log-in-cma_release
+++ a/mm/cma.c
@@ -510,7 +510,7 @@ bool cma_release(struct cma *cma, const
if (!cma || !pages)
return false;
- pr_debug("%s(page %p)\n", __func__, (void *)pages);
+ pr_debug("%s(page %p, count %u)\n", __func__, (void *)pages, count);
pfn = page_to_pfn(pages);
_
Patches currently in -mm which might be from charante@codeaurora.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 23:23 [merged] mm-cma-improve-pr_debug-log-in-cma_release.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.