From: Rik van Riel <riel@surriel.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <brendan.jackman@linux.dev>,
Zi Yan <ziy@nvidia.com>, Kairui Song <kasong@tencent.com>,
Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
Baoquan He <baoquan.he@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org
Subject: Re: [RFC PATCH 3/5] mm/page_alloc: convert any movable pageblock on a non-movable allocation
Date: Wed, 14 Oct 2026 16:53:59 -0400 [thread overview]
Message-ID: <5234543d2c1b44706501d2e079b41e95a6a1d200.camel@surriel.com> (raw)
In-Reply-To: <20261014204836.GI371161@cmpxchg.org>
On Wed, 2026-10-14 at 22:48 +0200, Johannes Weiner wrote:
> On Tue, Oct 06, 2026 at 10:12:48PM -0400, Rik van Riel wrote:
> > try_to_claim_block() converts a movable pageblock for a non-movable
> > allocation only when half its pages are free or compatible.
> > Otherwise the steal path takes pages without converting, and
> > non-movable content sits in a block still typed movable.
> >
> > Convert a movable block on any non-movable claim, however few of
> > its pages are free, so the block's type matches the allocation it
> > serves.
> >
> > When other pages in the block are freed later, they end up on the
> > non-movable free lists, directing more non-movable allocations to
> > the already non-movable page blocks.
> >
> > Converting a non-movable pageblock to movable is made stricter:
> > a movable claim takes a non-movable block only when every page
> > is free or movable.
> >
> > Blocks straddling a zone edge are never claimed;
> > zone_spans_pageblock() tests for a block wholly inside its zone.
> >
> > Assisted-by: LLM
> > Signed-off-by: Rik van Riel <riel@surriel.com>
>
> I like this in theory, but wonder how this behaves in practice.
>
> The block is claimed, but the movable constituents aren't proactively
> kicked out.
I have code for that, too, but it seems like
it's a lot easier to get things reviewed in
small portions.
If you want I can resend this as a larger
series, with:
1) the pageblock claiming
2) per migrate type free lists
3) evacuation of movable pages from unmovable
pageblocks, when the kernel free lists fall
below a watermark
That would be the full extent of the 2MB granularity
fragmentation avoidance stuff I have here.
Just let me know your preference.
--
All Rights Reversed.
next prev parent reply other threads:[~2026-10-14 20:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 2:12 [RFC PATCH 0/5] mm/page_alloc: keep non-movable pages out of movable pageblocks for THP Rik van Riel
2026-10-07 2:12 ` [RFC PATCH 1/5] mm/page_alloc: count guard pages as free again when their buddy merges Rik van Riel
2026-10-14 13:43 ` Dev Jain
2026-10-14 20:37 ` Johannes Weiner
2026-10-14 20:57 ` Zi Yan
2026-10-07 2:12 ` [RFC PATCH 2/5] mm/page_alloc: count a merged buddy's pages under the merged type Rik van Riel
2026-10-14 14:16 ` Dev Jain
2026-10-14 14:27 ` Rik van Riel
2026-10-14 15:19 ` Dev Jain
2026-10-14 15:40 ` Rik van Riel
2026-10-14 20:40 ` Johannes Weiner
2026-10-07 2:12 ` [RFC PATCH 3/5] mm/page_alloc: convert any movable pageblock on a non-movable allocation Rik van Riel
2026-10-14 20:48 ` Johannes Weiner
2026-10-14 20:53 ` Rik van Riel [this message]
2026-10-07 2:12 ` [RFC PATCH 4/5] mm/page_alloc: skip movable blocks during non-movable steals Rik van Riel
2026-10-07 2:12 ` [RFC PATCH 5/5] mm/page_alloc: claim blocks captured for non-movable use Rik van Riel
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=5234543d2c1b44706501d2e079b41e95a6a1d200.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=baoquan.he@linux.dev \
--cc=brendan.jackman@linux.dev \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kasong@tencent.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=qi.zheng@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--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
all inboxes | Powered by JetHome®