Commit e873c49f authored by Naoya Horiguchi's avatar Naoya Horiguchi Committed by Linus Torvalds

pagemap: export KPF_THP

This flag shows that a given page is a subpage of a transparent hugepage.
It helps us debug and test the kernel by showing physical address of thp.
Signed-off-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Reviewed-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 025c5b24
...@@ -115,6 +115,8 @@ u64 stable_page_flags(struct page *page) ...@@ -115,6 +115,8 @@ u64 stable_page_flags(struct page *page)
u |= 1 << KPF_COMPOUND_TAIL; u |= 1 << KPF_COMPOUND_TAIL;
if (PageHuge(page)) if (PageHuge(page))
u |= 1 << KPF_HUGE; u |= 1 << KPF_HUGE;
else if (PageTransCompound(page))
u |= 1 << KPF_THP;
/* /*
* Caveats on high order pages: page->_count will only be set * Caveats on high order pages: page->_count will only be set
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#define KPF_NOPAGE 20 #define KPF_NOPAGE 20
#define KPF_KSM 21 #define KPF_KSM 21
#define KPF_THP 22
/* kernel hacking assistances /* kernel hacking assistances
* WARNING: subject to change, never rely on them! * WARNING: subject to change, never rely on them!
......
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