Skip to contentSkip to conversation

mm-hugetlb-dont-wait-for-migration-entry-during-follow-page.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 19, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/hugetlb: don't wait for migration entry during follow page
has been removed from the -mm tree. Its filename was
mm-hugetlb-dont-wait-for-migration-entry-during-follow-page.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Peter Xu <[email protected]>
Subject: mm/hugetlb: don't wait for migration entry during follow page
Date: Fri, 16 Dec 2022 10:50:53 -0500

That's what the code does with !hugetlb pages, so we should logically do the same for hugetlb, so migration entry will also be treated as no page.

This is probably also the last piece in follow_page code that may sleep, the last one should be removed in cf994dd8af27 ("mm/gup: remove FOLL_MIGRATION", 2022-11-16).

---

 mm/hugetlb.c |   11 -----------
 1 file changed, 11 deletions(-)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-dont-wait-for-migration-entry-during-follow-page +0 -11
@@ -6401,7 +6401,6 @@ struct page *hugetlb_follow_page_mask(st
 	if (WARN_ON_ONCE(flags & FOLL_PIN))
 		return NULL;
 
-retry:
 	pte = huge_pte_offset(mm, haddr, huge_page_size(h));
 	if (!pte)
 		return NULL;
@@ -6424,16 +6423,6 @@ retry:
 			page = NULL;
 			goto out;
 		}
-	} else {
-		if (is_hugetlb_entry_migration(entry)) {
-			spin_unlock(ptl);
-			__migration_entry_wait_huge(pte, ptl);
-			goto retry;
-		}
-		/*
-		 * hwpoisoned entry is treated as no_page_table in
-		 * follow_page_mask().
-		 */
 	}
 out:
 	spin_unlock(ptl);

_

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

selftests-vm-remove-__use_gnu-in-hugetlb-madvisec.patch