[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190215220856.29749-12-zi.yan@sent.com>
Date: Fri, 15 Feb 2019 14:08:36 -0800
From: Zi Yan <zi.yan@...t.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Michal Hocko <mhocko@...nel.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
John Hubbard <jhubbard@...dia.com>,
Mark Hairgrove <mhairgrove@...dia.com>,
Nitin Gupta <nigupta@...dia.com>,
David Nellans <dnellans@...dia.com>, Zi Yan <ziy@...dia.com>
Subject: [RFC PATCH 11/31] mm: debug: print compound page order in dump_page().
From: Zi Yan <ziy@...dia.com>
Since we have more than just PMD-level THPs, printing compound page
order is helpful to check the actual compound page sizes.
Signed-off-by: Zi Yan <ziy@...dia.com>
---
mm/debug.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/debug.c b/mm/debug.c
index 0abb987dad9b..21d211d7776c 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -68,8 +68,12 @@ void __dump_page(struct page *page, const char *reason)
pr_warn("page:%px count:%d mapcount:%d mapping:%px index:%#lx",
page, page_ref_count(page), mapcount,
page->mapping, page_to_pgoff(page));
- if (PageCompound(page))
- pr_cont(" compound_mapcount: %d", compound_mapcount(page));
+ if (PageCompound(page)) {
+ struct page *head = compound_head(page);
+
+ pr_cont(" compound_mapcount: %d, order: %d", compound_mapcount(page),
+ compound_order(head));
+ }
pr_cont("\n");
if (PageAnon(page))
pr_warn("anon ");
--
2.20.1
Powered by blists - more mailing lists