From: Gregory Price <gourry@gourry.net>
To: David Hildenbrand <david@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com, akpm@linux-foundation.org, vbabka@suse.cz,
surenb@google.com, mhocko@suse.com, jackmanb@google.com,
hannes@cmpxchg.org, ziy@nvidia.com
Subject: Re: [RFC PATCH v2] page_alloc: allow migration of smaller hugepages during contig_alloc.
Date: Tue, 21 Oct 2025 12:05:58 -0400 [thread overview]
Message-ID: <aPevZplPtDUPZFUn@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <10402943-b613-4bd6-ab78-f34efa74a95c@redhat.com>
On Tue, Oct 21, 2025 at 11:30:48AM +0200, David Hildenbrand wrote:
> > Compaction `isolate_migrate_pages_block()` already expects requests
>
> Please, let's not talk about "compaction" here, it's just confusing to talk
> about compaction for something that is not compaction but uses some
> primitives (because not properly separated yet)
>
> Just say "isolate_migrate_pages_block() already expects ..."
>
will do
> > + /* Don't consider moving same size/larger pages */
> > + page = compound_head(page);
> > + order = compound_order(page);
> > + if ((order >= MAX_PAGE_ORDER) ||
> > + (nr_pages < (1 << order)))
> > + return false;
>
> This is roughly what we do in pageblock_skip_persistent(), just with a
> hardcoded pageblock size.
>
> I'm not sure about the MAX_PAGE_ORDER check, though. If an arch supports two
> hugetlb sizes that exceed MAX_PAGE_ORDER, it would not work as expected.
>
> Doesn't arm64 support that with cont-PMD vs. PUD hugetlb folios?
> MAX_FOLIO_ORDER would be better.
Will adjust to MAX_FOLIO_ORDER, makes sense. Missed that. Will take a
look at the pageblock code, I think I was looking at the compaction and
some other code for inspiration here.
~Gregory
next prev parent reply other threads:[~2025-10-21 16:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 21:08 Gregory Price
2025-10-20 23:02 ` Zi Yan
2025-10-21 1:25 ` Wei Yang
2025-10-21 1:28 ` Zi Yan
2025-10-21 9:14 ` Wei Yang
2025-10-21 16:03 ` Gregory Price
2025-10-21 20:15 ` Wei Yang
2025-10-21 1:29 ` Wei Yang
2025-10-21 9:30 ` David Hildenbrand
2025-10-21 16:05 ` Gregory Price [this message]
2025-10-22 1:40 ` SeongJae Park
2025-10-22 14:53 ` Gregory Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPevZplPtDUPZFUn@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox