]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs/proc/page.c: add PageAnon check to surely detect thp
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Fri, 3 Jan 2014 03:10:03 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:03 +0000 (14:10 +1100)
commit7e63547692fdb3da135197bcd6eb58cbc492a063
treea40a2befde92a30fa7cc9a58d7213436b99f78c4
parent83275df8738712ecd6c3357cf59c73dea23616b1
fs/proc/page.c: add PageAnon check to surely detect thp

stable_page_flags() checks !PageHuge && PageTransCompound && PageLRU to
know that a specified page is thp or not.  But sometimes it's not enough
and we fail to detect thp when the thp is on pagevec.  This happens only
for a few seconds after LRU list operations, but it makes it difficult to
control our applications depending on this flag.

So this patch adds another check PageAnon to detect thps on pagevec.  It
might not give the future extensibility for thp pagecache, but it's OK at
least for now.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/page.c