diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2012-03-22 00:33:58 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 01:54:57 +0100 |
commit | e873c49fbfdd595481976b915850e682441bcbec (patch) | |
tree | 87ad5d125563d1eb6418e1f7b5a094fab6098108 /fs/proc/page.c | |
parent | thp: optimize away unnecessary page table locking (diff) | |
download | linux-e873c49fbfdd595481976b915850e682441bcbec.tar.xz linux-e873c49fbfdd595481976b915850e682441bcbec.zip |
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: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: KOSAKI 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/page.c')
-rw-r--r-- | fs/proc/page.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/page.c b/fs/proc/page.c index 6d8e6a9e93ab..7fcd0d60a968 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -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 |