]> Git Repo - linux.git/commitdiff
pagemap: export KPF_THP
authorNaoya Horiguchi <[email protected]>
Wed, 21 Mar 2012 23:33:58 +0000 (16:33 -0700)
committerLinus Torvalds <[email protected]>
Thu, 22 Mar 2012 00:54:57 +0000 (17:54 -0700)
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: Naoya Horiguchi <[email protected]>
Reviewed-by: Wu Fengguang <[email protected]>
Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/page.c
include/linux/kernel-page-flags.h

index 6d8e6a9e93aba59e471d32d4ee9dc59b2579d8c4..7fcd0d60a9680ae1eb4998633c51ea90e730209f 100644 (file)
@@ -115,6 +115,8 @@ u64 stable_page_flags(struct page *page)
                u |= 1 << KPF_COMPOUND_TAIL;
        if (PageHuge(page))
                u |= 1 << KPF_HUGE;
+       else if (PageTransCompound(page))
+               u |= 1 << KPF_THP;
 
        /*
         * Caveats on high order pages: page->_count will only be set
index bd92a89f4b0aa49cadcb6d320a8d2815ffd190c3..26a65711676f421dd1e287734ac4f781c713c8b0 100644 (file)
@@ -30,6 +30,7 @@
 #define KPF_NOPAGE             20
 
 #define KPF_KSM                        21
+#define KPF_THP                        22
 
 /* kernel hacking assistances
  * WARNING: subject to change, never rely on them!
This page took 0.053773 seconds and 4 git commands to generate.