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@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx> Cc: Andi Kleen <andi.kleen@xxxxxxxxx> Acked-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxx are -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html