Commit 452b557c authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Linus Torvalds

mm/debug: dump compound page information on a second line

Simplify both the implementation and the output by splitting all the
compound page information onto a second line.
Reported-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Tested-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: William Kucharski <william.kucharski@oracle.com>
Link: http://lkml.kernel.org/r/20200709202117.7216-3-willy@infradead.orgSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e1ab96f8
......@@ -95,27 +95,21 @@ void __dump_page(struct page *page, const char *reason)
*/
mapcount = PageSlab(head) ? 0 : page_mapcount(page);
if (compound)
pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n",
page, page_ref_count(head), mapcount, mapping,
page_to_pgoff(page));
if (compound) {
if (hpage_pincount_available(page)) {
pr_warn("page:%px refcount:%d mapcount:%d mapping:%p "
"index:%#lx head:%px 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));
pr_warn("head:%px order:%u compound_mapcount:%d compound_pincount:%d\n",
head, compound_order(head),
compound_mapcount(head),
compound_pincount(head));
} else {
pr_warn("page:%px refcount:%d mapcount:%d mapping:%p "
"index:%#lx head:%px order:%u "
"compound_mapcount:%d\n",
page, page_ref_count(head), mapcount,
mapping, page_to_pgoff(page), head,
compound_order(head), compound_mapcount(page));
pr_warn("head:%px order:%u compound_mapcount:%d\n",
head, compound_order(head),
compound_mapcount(head));
}
}
else
pr_warn("page:%px refcount:%d mapcount:%d mapping:%p index:%#lx\n",
page, page_ref_count(page), mapcount,
mapping, page_to_pgoff(page));
if (PageKsm(page))
type = "ksm ";
else if (PageAnon(page))
......
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