From: Johannes Weiner <hannes@cmpxchg.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Marc Hartmayer <mhartmay@linux.ibm.com>,
linux-mm@kvack.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: change all pageblocks migrate type on coalescing
Date: Sun, 14 Dec 2025 11:06:06 -0500 [thread overview]
Message-ID: <20251214160606.GA905277@cmpxchg.org> (raw)
In-Reply-To: <5e79bed1-598d-4e34-8f1e-87b6dba52bf8@suse.cz>
On Fri, Dec 12, 2025 at 04:46:46PM +0100, Vlastimil Babka wrote:
> On 12/12/25 16:14, Alexander Gordeev wrote:
> > When a page is freed it coalesces with a buddy into a higher
> > order page while possible. When the buddy page migrate type
> > differs, it is expected to be updated to match the one of the
> > page being freed.
> >
> > However, only the first pageblock of the buddy page is updated,
> > while the rest of the pageblocks are left unchanged.
> >
> > That causes warnings in later expand() and other code paths
> > (like below), since an inconsistency between migration type
> > of the list containing the page and the page-owned pageblocks
> > migration types is introduced.
Absolutely right, and the fix makes sense to me. Thanks!
> Hm I guess we haven't seen this before because it's common that
> pageblock_order is just one below MAX_ORDER so we're only merging two
> pageblocks. But your arch/config must be different to expose it. In any case
> LGTM, thanks.
+1
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
The warning makes the issue loud, but your patch is arguably fixing an
earlier commit that introduces type updates during merges. How about:
Fixes: e6cf9e1c4cde ("mm: page_alloc: fix up block types when merging compatible blocks")
Cc: stable@kernel.org
next prev parent reply other threads:[~2025-12-14 16:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 15:14 Alexander Gordeev
2025-12-12 15:46 ` Vlastimil Babka
2025-12-14 16:06 ` Johannes Weiner [this message]
2025-12-15 7:49 ` Alexander Gordeev
2025-12-15 0:37 ` Wei Yang
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=20251214160606.GA905277@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=mhartmay@linux.ibm.com \
--cc=vbabka@suse.cz \
/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