diff mbox series

[3/3] mm: Print hashed address of struct page

Message ID 20200629151918.15537-4-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Improvements for dump_page() | expand

Commit Message

Matthew Wilcox June 29, 2020, 3:19 p.m. UTC
The actual address of the struct page isn't particularly helpful,
while the hashed address helps match with other messages elsewhere.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 mm/debug.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Kirill A . Shutemov July 2, 2020, 3:56 p.m. UTC | #1
On Mon, Jun 29, 2020 at 04:19:18PM +0100, Matthew Wilcox (Oracle) wrote:
> The actual address of the struct page isn't particularly helpful,
> while the hashed address helps match with other messages elsewhere.

Hashed addresses would lose useful alignment information. I found it
useful more than once to check if the page is THP-aligned or not.
diff mbox series

Patch

diff --git a/mm/debug.c b/mm/debug.c
index 5c58d4509dc9..fcf3a16902b2 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -86,23 +86,23 @@  void __dump_page(struct page *page, const char *reason)
 
 	if (compound)
 		if (hpage_pincount_available(page)) {
-			pr_warn("page:%px refcount:%d mapcount:%d mapping:%p "
-				"index:%#lx head:%px order:%u "
+			pr_warn("page:%p refcount:%d mapcount:%d mapping:%p "
+				"index:%#lx head:%p order:%u "
 				"compound_mapcount:%d compound_pincount:%d\n",
 				page, page_ref_count(head), mapcount,
 				mapping, page_to_pgoff(page), head,
 				compound_order(head), compound_mapcount(page),
 				compound_pincount(page));
 		} else {
-			pr_warn("page:%px refcount:%d mapcount:%d mapping:%p "
-				"index:%#lx head:%px order:%u "
+			pr_warn("page:%p refcount:%d mapcount:%d mapping:%p "
+				"index:%#lx head:%p order:%u "
 				"compound_mapcount:%d\n",
 				page, page_ref_count(head), mapcount,
 				mapping, page_to_pgoff(page), head,
 				compound_order(head), compound_mapcount(page));
 		}
 	else
-		pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n",
+		pr_warn("page:%p refcount:%d mapcount:%d mapping:%p index:%#lx\n",
 			page, page_ref_count(page), mapcount,
 			mapping, page_to_pgoff(page));
 	if (PageKsm(page))