* [to-be-updated] pagemap-fix-wrong-kpf_thp-on-slab-pages.patch removed from -mm tree
@ 2012-09-26 20:37 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-09-26 20:37 UTC (permalink / raw)
To: n-horiguchi, andi.kleen, fengguang.wu, kosaki.motohiro, mm-commits
The patch titled
Subject: Re: pagemap: fix wrong KPF_THP on slab pages
has been removed from the -mm tree. Its filename was
pagemap-fix-wrong-kpf_thp-on-slab-pages.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Subject: Re: pagemap: fix wrong KPF_THP on slab pages
KPF_THP can be set on non-huge compound pages like slab pages, because
PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug
and breaks user space applications which look for thp via /proc/kpageflags.
Currently thp is constructed only on anonymous pages, so this patch makes
KPF_THP be set when both of PageAnon and PageTransCompound are true.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/page.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff -puN fs/proc/page.c~pagemap-fix-wrong-kpf_thp-on-slab-pages fs/proc/page.c
--- a/fs/proc/page.c~pagemap-fix-wrong-kpf_thp-on-slab-pages
+++ a/fs/proc/page.c
@@ -115,7 +115,12 @@ u64 stable_page_flags(struct page *page)
u |= 1 << KPF_COMPOUND_TAIL;
if (PageHuge(page))
u |= 1 << KPF_HUGE;
- else if (PageTransCompound(page))
+ /*
+ * Since THP is relevant only for anonymous pages so far, we check it
+ * explicitly with PageAnon. Otherwise thp is confounded with non-huge
+ * compound pages like slab pages.
+ */
+ else if (PageTransCompound(page) && PageAnon(page))
u |= 1 << KPF_THP;
/*
_
Patches currently in -mm which might be from n-horiguchi@ah.jp.nec.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-26 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 20:37 [to-be-updated] pagemap-fix-wrong-kpf_thp-on-slab-pages.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).