lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 11/31] mm: debug: print compound page order in dump_page().
Date
From: Zi Yan <ziy@nvidia.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@nvidia.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
\
 
 \ /
  Last update: 2019-02-15 23:11    [W:0.221 / U:3.308 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site