Skip to contentSkip to conversation

mm-drop-is_huge_zero_pud.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 17, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: drop is_huge_zero_pud()
has been removed from the -mm tree. Its filename was
mm-drop-is_huge_zero_pud.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: drop is_huge_zero_pud()
Date: Mon, 26 Aug 2024 16:43:36 -0400

It constantly returns false since 2017. One assertion is added in 2019 but it should never have triggered, IOW it means what is checked should be asserted instead.

If it didn't exist for 7 years maybe it's good idea to remove it and only add it when it comes.

Cc Matthew Wilcox <[email protected]>
Cc Aneesh Kumar K.V <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Alex Williamson <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Gavin Shan <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Niklas Schnelle <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>
Cc Zi Yan <[email protected]>

---

 include/linux/huge_mm.h |   10 ----------
 mm/huge_memory.c        |   13 +------------
 2 files changed, 1 insertion(+), 22 deletions(-)
include/linux/huge_mm.h renamed from include/linux/huge_mm.h~mm-drop-is_huge_zero_pud +0 -10
@@ -433,11 +433,6 @@ static inline bool is_huge_zero_pmd(pmd_
 	return pmd_present(pmd) && READ_ONCE(huge_zero_pfn) == pmd_pfn(pmd);
 }
 
-static inline bool is_huge_zero_pud(pud_t pud)
-{
-	return false;
-}
-
 struct folio *mm_get_huge_zero_folio(struct mm_struct *mm);
 void mm_put_huge_zero_folio(struct mm_struct *mm);
 
@@ -577,11 +572,6 @@ static inline bool is_huge_zero_pmd(pmd_
 {
 	return false;
 }
-
-static inline bool is_huge_zero_pud(pud_t pud)
-{
-	return false;
-}
 
 static inline void mm_put_huge_zero_folio(struct mm_struct *mm)
 {
mm/huge_memory.c renamed from mm/huge_memory.c~mm-drop-is_huge_zero_pud +1 -12
@@ -1453,10 +1453,8 @@ static void insert_pfn_pud(struct vm_are
 	ptl = pud_lock(mm, pud);
 	if (!pud_none(*pud)) {
 		if (write) {
-			if (pud_pfn(*pud) != pfn_t_to_pfn(pfn)) {
-				WARN_ON_ONCE(!is_huge_zero_pud(*pud));
+			if (WARN_ON_ONCE(pud_pfn(*pud) != pfn_t_to_pfn(pfn)))
 				goto out_unlock;
-			}
 			entry = pud_mkyoung(*pud);
 			entry = maybe_pud_mkwrite(pud_mkdirty(entry), vma);
 			if (pudp_set_access_flags(vma, addr, pud, entry, 1))
@@ -1705,15 +1703,6 @@ int copy_huge_pud(struct mm_struct *dst_
 		goto out_unlock;
 
 	/*
-	 * When page table lock is held, the huge zero pud should not be
-	 * under splitting since we don't split the page itself, only pud to
-	 * a page table.
-	 */
-	if (is_huge_zero_pud(pud)) {
-		/* No huge zero pud yet */
-	}
-
-	/*
 	 * TODO: once we support anonymous pages, use
 	 * folio_try_dup_anon_rmap_*() and split if duplicating fails.
 	 */

_

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