Re: [PATCH v6] page_alloc: allow migration of smaller hugepages during contig_alloc
From: Gregory Price
Date: Fri Dec 19 2025 - 15:59:41 EST
On Fri, Dec 19, 2025 at 03:48:45PM -0500, Zi Yan wrote:
> On 18 Dec 2025, at 18:38, Gregory Price wrote:
>
> > + if (PageHuge(page)) {
> > + unsigned int order;
> > +
> > + if (!IS_ENABLED(CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION))
> > + return false;
> > +
> > + if (skip_hugetlb) {
> > + *skipped_hugetlb = true;
>
> I do not know whether we should check if skipped_hugetlb is NULL or not,
> since pfn_range_valid_contig() is only called by alloc_contig_pages_noprof().
> I have no strong opinion on an additional skipped_hugetlb check.
>
I'm fine either way if folks have a preference. Compiler might even
optimize it anyway after things get inlined.
> Otherwise, LGTM.
>
> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
>
Thanks again!
~Gregory