Skip to contentSkip to conversation

mm-hugetlb-use-folio-lru-int-demote_free_hugetlb_folios.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 16, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled

     Subject: mm/hugetlb: use folio->lru int demote_free_hugetlb_folios()

has been removed from the -mm tree. Its filename was
mm-hugetlb-use-folio-lru-int-demote_free_hugetlb_folios.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: David Hildenbrand <[email protected]>
Subject: mm/hugetlb: use folio->lru int demote_free_hugetlb_folios()
Date: Mon, 13 Jan 2025 14:16:11 +0100

We are demoting hugetlb folios to smaller hugetlb folios; let's avoid messing with pages where avoidable and handle it more similar to __split_huge_page_tail().

---

 mm/hugetlb.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-use-folio-lru-int-demote_free_hugetlb_folios +5 -3
@@ -3826,13 +3826,15 @@ static long demote_free_hugetlb_folios(s
 
 		for (i = 0; i < pages_per_huge_page(src); i += pages_per_huge_page(dst)) {
 			struct page *page = folio_page(folio, i);
+			/* Careful: see __split_huge_page_tail() */
+			struct folio *new_folio = (struct folio *)page;
 
-			page->mapping = NULL;
 			clear_compound_head(page);
 			prep_compound_page(page, dst->order);
 
-			init_new_hugetlb_folio(dst, page_folio(page));
-			list_add(&page->lru, &dst_list);
+			new_folio->mapping = NULL;
+			init_new_hugetlb_folio(dst, new_folio);
+			list_add(&new_folio->lru, &dst_list);
 		}
 	}
 

_

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