Skip to contentSkip to conversation

mm-alloc_anon_folio-avoid-doing-vma_thp_gfp_mask-in-fallback-cases.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Apr 26, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: alloc_anon_folio: avoid doing vma_thp_gfp_mask in fallback cases
has been removed from the -mm tree. Its filename was
mm-alloc_anon_folio-avoid-doing-vma_thp_gfp_mask-in-fallback-cases.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: Barry Song <[email protected]>
Subject: mm: alloc_anon_folio: avoid doing vma_thp_gfp_mask in fallback cases
Date: Fri, 29 Mar 2024 20:37:50 +1300

Fallback rates surpassing 90% have been observed on phones utilizing 64KiB CONT-PTE mTHP. In these scenarios, when one out of every 16 PTEs fails to allocate large folios, the remaining 15 PTEs fallback. Consequently, invoking vma_thp_gfp_mask seems redundant in such cases. Furthermore, abstaining from its use can also contribute to improved code readability.

Cc Kefeng Wang <[email protected]>
Cc John Hubbard <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Alistair Popple <[email protected]>
Cc Anshuman Khandual <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc David Rientjes <[email protected]>
Cc "Huang, Ying" <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Itaru Kitayama <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Luis Chamberlain <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Yang Shi <[email protected]>
Cc Yin Fengwei <[email protected]>

---

 mm/memory.c |    3 +++
 1 file changed, 3 insertions(+)
mm/memory.c renamed from mm/memory.c~mm-alloc_anon_folio-avoid-doing-vma_thp_gfp_mask-in-fallback-cases +3 -0
@@ -4358,6 +4358,9 @@ static struct folio *alloc_anon_folio(st
 
 	pte_unmap(pte);
 
+	if (!orders)
+		goto fallback;
+
 	/* Try allocating the highest of the remaining orders. */
 	gfp = vma_thp_gfp_mask(vma);
 	while (orders) {

_

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

mm-add-per-order-mthp-anon_fault_alloc-and-anon_fault_fallback-counters.patch mm-add-per-order-mthp-anon_swpout-and-anon_swpout_fallback-counters.patch mm-add-docs-for-per-order-mthp-counters-and-transhuge_page-abi.patch mm-add-docs-for-per-order-mthp-counters-and-transhuge_page-abi-fix.patch mm-correct-the-docs-for-thp_fault_alloc-and-thp_fault_fallback.patch