Skip to content

Commit

Permalink
mm/page_owner/cma: show pfn in cma/page_owner with hex format
Browse files Browse the repository at this point in the history
cma: display pfn as well as pfn_to_page(pfn)

page_owner: display pfn in hex rather than decimal

Link: https://lkml.kernel.org/r/20230613092533.15449-1-quic_yingangl@quicinc.com
Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Kassey Li authored and Andrew Morton committed Jun 19, 2023
1 parent 6d68f64 commit 399fd49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mm/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mm/page_owner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 399fd49

Please sign in to comment.