Skip to content

Commit

Permalink
pagemap: export KPF_THP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Naoya Horiguchi authored and Linus Torvalds committed Mar 22, 2012
1 parent 025c5b2 commit e873c49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/proc/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions include/linux/kernel-page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit e873c49

Please sign in to comment.