Skip to contentSkip to conversation

fs-proc-pagec-add-pageanon-check-to-surely-detect-thp.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 24, 2014 Proc filesystem

lore
Share & tools
lore
#0 lore raw

Subject: [merged] fs-proc-pagec-add-pageanon-check-to-surely-detect-thp.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 24 Jan 2014 10:58:31 -0800

The patch titled
Subject: fs/proc/page.c: add PageAnon check to surely detect thp
has been removed from the -mm tree. Its filename was
fs-proc-pagec-add-pageanon-check-to-surely-detect-thp.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Naoya Horiguchi <[email protected]>
Subject: 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.

Cc David Rientjes <[email protected]>
Cc KOSAKI Motohiro <[email protected]>
Cc Wu Fengguang <[email protected]>

---

 fs/proc/page.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
fs/proc/page.c renamed from fs/proc/page.c~fs-proc-pagec-add-pageanon-check-to-surely-detect-thp +5 -3
diff -puN fs/proc/page.c~fs-proc-pagec-add-pageanon-check-to-surely-detect-thp fs/proc/page.c
@@ -118,10 +118,12 @@ u64 stable_page_flags(struct page *page)
 	/*
 	 * PageTransCompound can be true for non-huge compound pages (slab
 	 * pages or pages allocated by drivers with __GFP_COMP) because it
-	 * just checks PG_head/PG_tail, so we need to check PageLRU to make
-	 * sure a given page is a thp, not a non-huge compound page.
+	 * just checks PG_head/PG_tail, so we need to check PageLRU/PageAnon
+	 * to make sure a given page is a thp, not a non-huge compound page.
 	 */
-	else if (PageTransCompound(page) && PageLRU(compound_trans_head(page)))
+	else if (PageTransCompound(page) &&
+		 (PageLRU(compound_trans_head(page)) ||
+		  PageAnon(compound_trans_head(page))))
 		u |= 1 << KPF_THP;
 
 	/*

_

Patches currently in -mm which might be from [email protected] are

origin.patch mm-migratec-fix-setting-of-cpupid-on-page-migration-twice-against-normal-page.patch