Commit 54a75157 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Linus Torvalds

mm/debug: print hashed address of struct page

The actual address of the struct page isn't particularly helpful, while
the hashed address helps match with other messages elsewhere.  Add the PFN
that the page refers to in order to help diagnose problems where the page
is improperly aligned for the purpose.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: William Kucharski <william.kucharski@oracle.com>
Link: http://lkml.kernel.org/r/20200709202117.7216-7-willy@infradead.orgSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9bdaf2cc
...@@ -95,17 +95,17 @@ void __dump_page(struct page *page, const char *reason) ...@@ -95,17 +95,17 @@ void __dump_page(struct page *page, const char *reason)
*/ */
mapcount = PageSlab(head) ? 0 : page_mapcount(page); mapcount = PageSlab(head) ? 0 : page_mapcount(page);
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 pfn:%#lx\n",
page, page_ref_count(head), mapcount, mapping, page, page_ref_count(head), mapcount, mapping,
page_to_pgoff(page)); page_to_pgoff(page), page_to_pfn(page));
if (compound) { if (compound) {
if (hpage_pincount_available(page)) { if (hpage_pincount_available(page)) {
pr_warn("head:%px order:%u compound_mapcount:%d compound_pincount:%d\n", pr_warn("head:%p order:%u compound_mapcount:%d compound_pincount:%d\n",
head, compound_order(head), head, compound_order(head),
compound_mapcount(head), compound_mapcount(head),
compound_pincount(head)); compound_pincount(head));
} else { } else {
pr_warn("head:%px order:%u compound_mapcount:%d\n", pr_warn("head:%p order:%u compound_mapcount:%d\n",
head, compound_order(head), head, compound_order(head),
compound_mapcount(head)); compound_mapcount(head));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment