Skip to contentSkip to conversation

mm-thp-remap_page-is-only-needed-on-anonymous-thp.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/thp: remap_page() is only needed on anonymous THP
has been removed from the -mm tree. Its filename was
mm-thp-remap_page-is-only-needed-on-anonymous-thp.patch

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

------------------------------------------------------
From: Hugh Dickins <[email protected]>
Subject: mm/thp: remap_page() is only needed on anonymous THP

THP splitting's unmap_page() only sets TTU_SPLIT_FREEZE when PageAnon, and migration entries are only inserted when TTU_MIGRATION (unused here) or TTU_SPLIT_FREEZE is set: so it's just a waste of time for remap_page() to search for migration entries to remove when !PageAnon.

Fixes baa355fd3314 ("thp: file pages support for split_huge_page()")
Cc Alistair Popple <[email protected]>
Cc Jan Kara <[email protected]>
Cc Jue Wang <[email protected]>
Cc "Matthew Wilcox (Oracle)" <[email protected]>
Cc Miaohe Lin <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Naoya Horiguchi <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Peter Xu <[email protected]>
Cc Ralph Campbell <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Wang Yugui <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/huge_memory.c |    5 +++++
 1 file changed, 5 insertions(+)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-remap_page-is-only-needed-on-anonymous-thp +5 -0
@@ -2307,6 +2307,7 @@ static void unmap_page(struct page *page
 
 	VM_BUG_ON_PAGE(!PageHead(page), page);
 
+	/* If TTU_SPLIT_FREEZE is ever extended to file, update remap_page() */
 	if (PageAnon(page))
 		ttu_flags |= TTU_SPLIT_FREEZE;
 
@@ -2318,6 +2319,10 @@ static void unmap_page(struct page *page
 static void remap_page(struct page *page, unsigned int nr)
 {
 	int i;
+
+	/* If TTU_SPLIT_FREEZE is ever extended to file, remove this check */
+	if (!PageAnon(page))
+		return;
 	if (PageTransHuge(page)) {
 		remove_migration_ptes(page, page, true);
 	} else {

_

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