Skip to contentSkip to conversation

mm-hugetlb-use-__gfp_comp-for-gigantic-folios.patch removed from -mm tree

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

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/hugetlb: use __GFP_COMP for gigantic folios
has been removed from the -mm tree. Its filename was
mm-hugetlb-use-__gfp_comp-for-gigantic-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: Yu Zhao <[email protected]>
Subject: mm/hugetlb: use __GFP_COMP for gigantic folios
Date: Tue, 13 Aug 2024 21:54:51 -0600

Use __GFP_COMP for gigantic folios to greatly reduce not only the amount of code but also the allocation and free time.

LOC (approximately): +60, -240

Allocate and free 500 1GB hugeTLB memory without HVO by:
time echo 500 >/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages time echo 0 >/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages

       Before  After
Alloc  ~13s    ~10s
Free   ~15s    <1s

The above magnitude generally holds for multiple x86 and arm64 CPU models.

---

 include/linux/hugetlb.h |    9 -
 mm/hugetlb.c            |  290 +++++++-------------------------------
 2 files changed, 61 insertions(+), 238 deletions(-)
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-use-__gfp_comp-for-gigantic-folios +5 -4
@@ -896,10 +896,11 @@ static inline bool hugepage_movable_supp
 /* Movability of hugepages depends on migration support. */
 static inline gfp_t htlb_alloc_mask(struct hstate *h)
 {
-	if (hugepage_movable_supported(h))
-		return GFP_HIGHUSER_MOVABLE;
-	else
-		return GFP_HIGHUSER;
+	gfp_t gfp = __GFP_COMP | __GFP_NOWARN;
+
+	gfp |= hugepage_movable_supported(h) ? GFP_HIGHUSER_MOVABLE : GFP_HIGHUSER;
+
+	return gfp;
 }
 
 static inline gfp_t htlb_modify_alloc_mask(struct hstate *h, gfp_t gfp_mask)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-use-__gfp_comp-for-gigantic-folios +56 -234

394 lines not on this page · raw message

_

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

mm-free-zapped-tail-pages-when-splitting-isolated-thp.patch mm-remap-unused-subpages-to-shared-zeropage-when-splitting-isolated-thp.patch