linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_owner/cma: show pfn in cma/page_onwer with hex format
@ 2023-06-13  9:25 Kassey Li
  0 siblings, 0 replies; only message in thread
From: Kassey Li @ 2023-06-13  9:25 UTC (permalink / raw)
  To: akpm, vbabka
  Cc: Kassey Li, minchan, vbabka, iamjoonsoo.kim, linux-kernel, linux-mm

pfn is more easy to read in CMA log, against with page_onwer
show in the same hex format.

Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
---
 mm/cma.c        | 4 ++--
 mm/page_owner.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/cma.c b/mm/cma.c
index 6268d6620254..a4cfe995e11e 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -483,8 +483,8 @@ struct page *cma_alloc(struct cma *cma, unsigned long count,
 		if (ret != -EBUSY)
 			break;
 
-		pr_debug("%s(): memory range at %p is busy, retrying\n",
-			 __func__, pfn_to_page(pfn));
+		pr_debug("%s(): memory range at pfn 0x%lx %p is busy, retrying\n",
+			 __func__, pfn, pfn_to_page(pfn));
 
 		trace_cma_alloc_busy_retry(cma->name, pfn, pfn_to_page(pfn),
 					   count, align);
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 31169b3e7f06..c93baef0148f 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -418,7 +418,7 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
 	pageblock_mt = get_pageblock_migratetype(page);
 	page_mt  = gfp_migratetype(page_owner->gfp_mask);
 	ret += scnprintf(kbuf + ret, count - ret,
-			"PFN %lu type %s Block %lu type %s Flags %pGp\n",
+			"PFN 0x%lx type %s Block %lu type %s Flags %pGp\n",
 			pfn,
 			migratetype_names[page_mt],
 			pfn >> pageblock_order,
-- 
2.17.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-13  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13  9:25 [PATCH] mm/page_owner/cma: show pfn in cma/page_onwer with hex format Kassey Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox