Skip to contentSkip to conversation

mm-page_alloc-refactor-the-initial-compaction-handling.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jan 27

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/page_alloc: refactor the initial compaction handling
has been removed from the -mm tree. Its filename was
mm-page_alloc-refactor-the-initial-compaction-handling.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: Vlastimil Babka <[email protected]>
Subject: mm/page_alloc: refactor the initial compaction handling
Date: Tue, 06 Jan 2026 12:52:37 +0100

The initial direct compaction done in some cases in __alloc_pages_slowpath() stands out from the main retry loop of reclaim + compaction.

We can simplify this by instead skipping the initial reclaim attempt via a new local variable compact_first, and handle the compact_prority as necessary to match the original behavior. No functional change intended.

---

 include/linux/gfp.h |    8 ++-
 mm/page_alloc.c     |  100 ++++++++++++++++++++----------------------
 2 files changed, 55 insertions(+), 53 deletions(-)
include/linux/gfp.h renamed from include/linux/gfp.h~mm-page_alloc-refactor-the-initial-compaction-handling +7 -1
@@ -407,9 +407,15 @@ extern gfp_t gfp_allowed_mask;
 /* Returns true if the gfp_mask allows use of ALLOC_NO_WATERMARK */
 bool gfp_pfmemalloc_allowed(gfp_t gfp_mask);
 
+/* A helper for checking if gfp includes all the specified flags */
+static inline bool gfp_has_flags(gfp_t gfp, gfp_t flags)
+{
+	return (gfp & flags) == flags;
+}
+
 static inline bool gfp_has_io_fs(gfp_t gfp)
 {
-	return (gfp & (__GFP_IO | __GFP_FS)) == (__GFP_IO | __GFP_FS);
+	return gfp_has_flags(gfp, __GFP_IO | __GFP_FS);
 }
 
 /*
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-refactor-the-initial-compaction-handling +48 -52

136 lines not on this page · raw message

_

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