summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:59:22 -0700
committerAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:59:22 -0700
commitd295e92f3ce87310c4bd77d24a4fe30b43745c67 (patch)
treea89dd851bfe66b9d726d6ed04ab043334dd8c6db
parent6dca207746993b67a629fc77e9f52cfb451ccf99 (diff)
download25-new-d295e92f3ce87310c4bd77d24a4fe30b43745c67.tar.gz
foo
-rw-r--r--patches/mm-page_isolation-prepare-for-hygienic-freelists.patch18
1 files changed, 12 insertions, 6 deletions
diff --git a/patches/mm-page_isolation-prepare-for-hygienic-freelists.patch b/patches/mm-page_isolation-prepare-for-hygienic-freelists.patch
index 1aefe82ef..9c6ec6b2e 100644
--- a/patches/mm-page_isolation-prepare-for-hygienic-freelists.patch
+++ b/patches/mm-page_isolation-prepare-for-hygienic-freelists.patch
@@ -40,6 +40,8 @@ pages can be large, and how they are freed.
Based on extensive discussions with and invaluable input from Zi Yan.
+[hannes@cmpxchg.org: work around older gcc warning]
+ Link: https://lkml.kernel.org/r/20240321142426.GB777580@cmpxchg.org
Link: https://lkml.kernel.org/r/20240320180429.678181-10-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
@@ -53,9 +55,9 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/page-isolation.h | 4
mm/internal.h | 4
- mm/page_alloc.c | 200 +++++++++++++++++--------------
+ mm/page_alloc.c | 204 ++++++++++++++++++-------------
mm/page_isolation.c | 106 ++++------------
- 4 files changed, 151 insertions(+), 163 deletions(-)
+ 4 files changed, 155 insertions(+), 163 deletions(-)
--- a/include/linux/page-isolation.h~mm-page_isolation-prepare-for-hygienic-freelists
+++ a/include/linux/page-isolation.h
@@ -161,7 +163,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
{
unsigned long start_pfn, end_pfn;
-@@ -1686,6 +1628,119 @@ int move_freepages_block(struct zone *zo
+@@ -1686,6 +1628,123 @@ int move_freepages_block(struct zone *zo
return move_freepages(zone, start_pfn, end_pfn, migratetype);
}
@@ -240,6 +242,10 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+ NULL, NULL))
+ return false;
+
++ /* No splits needed if buddies can't span multiple blocks */
++ if (pageblock_order == MAX_PAGE_ORDER)
++ goto move;
++
+ /* We're a tail block in a larger buddy */
+ pfn = find_large_buddy(start_pfn);
+ if (pfn != start_pfn) {
@@ -267,7 +273,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+ split_large_buddy(zone, page, pfn, order);
+ return true;
+ }
-+
++move:
+ mt = get_pfnblock_migratetype(page, start_pfn);
+ nr_moved = move_freepages(zone, start_pfn, end_pfn, migratetype);
+ if (!is_migrate_isolate(mt))
@@ -281,7 +287,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
static void change_pageblock_range(struct page *pageblock_page,
int start_order, int migratetype)
{
-@@ -6365,7 +6420,6 @@ int alloc_contig_range_noprof(unsigned l
+@@ -6365,7 +6424,6 @@ int alloc_contig_range_noprof(unsigned l
unsigned migratetype, gfp_t gfp_mask)
{
unsigned long outer_start, outer_end;
@@ -289,7 +295,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
int ret = 0;
struct compact_control cc = {
-@@ -6438,29 +6492,7 @@ int alloc_contig_range_noprof(unsigned l
+@@ -6438,29 +6496,7 @@ int alloc_contig_range_noprof(unsigned l
* We don't have to hold zone->lock here because the pages are
* isolated thus they won't get removed from buddy.
*/