[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPZd1dAIzAw7Ii8E@gourry-fedora-PF4VCD3F>
Date: Mon, 20 Oct 2025 12:05:41 -0400
From: Gregory Price <gourry@...rry.net>
To: David Hildenbrand <david@...hat.com>
Cc: linux-mm@...ck.org, osalvador@...e.de, corbet@....net,
muchun.song@...ux.dev, akpm@...ux-foundation.org,
hannes@...xchg.org, laoar.shao@...il.com, mclapinski@...gle.com,
joel.granados@...nel.org, jack@...e.cz, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, Mel Gorman <mgorman@...e.de>,
Michal Hocko <mhocko@...e.com>,
Alexandru Moise <00moses.alexander00@...il.com>,
David Rientjes <rientjes@...gle.com>
Subject: Re: [RFC PATCH] mm, hugetlb: implement movable_gigantic_pages sysctl
On Mon, Oct 20, 2025 at 04:17:06PM +0200, David Hildenbrand wrote:
> On 09.10.25 18:15, Gregory Price wrote:
> That could be supported by allowing for moving hugetlb folios when their
> size is small enough to be served by the buddy, and the size we are
> allocating is larger than the one of these folios.
>
I think this is roughly what you'd be looking for?
~Gregory
---
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5549b32cdd31..5def2c53092e 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6922,8 +6922,12 @@ static bool pfn_range_valid_contig(struct zone *z, unsigned long start_pfn,
if (PageReserved(page))
return false;
- if (PageHuge(page))
- return false;
+ if (PageHuge(page)) {
+ /* Don't consider moving same size/larger pages */
+ if (!CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION ||
+ ((1 << compound_order(page)) >= nr_pages))
+ return false;
+ }
}
return true;
}
Powered by blists - more mailing lists