From: Muchun Song <muchun.song@linux.dev>
To: Longlong Xia <xialonglong2025@163.com>
Cc: Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jinjiang Tu <tujinjiang@huawei.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Longlong Xia <xialonglong@kylinos.cn>
Subject: Re: [PATCH 1/1] mm/hugetlb: keep max_huge_pages when dissolving surplus folios
Date: Sat, 15 Aug 2026 11:54:29 +0800 [thread overview]
Message-ID: <A277EA38-31EF-4252-BA17-6B8A18DB6174@linux.dev> (raw)
In-Reply-To: <20260814083027.1419487-1-xialonglong2025@163.com>
> On Aug 14, 2026, at 16:30, Longlong Xia <xialonglong2025@163.com> wrote:
>
> From: Longlong Xia <xialonglong@kylinos.cn>
>
> dissolve_free_hugetlb_folio() can remove a free folio as surplus when
> its node has surplus pages. In that case remove_hugetlb_folio()
> decrements both nr_huge_pages and surplus_huge_pages, leaving the
> persistent pool size unchanged.
>
> Updating max_huge_pages as if a persistent folio had been removed can
> therefore corrupt the persistent pool target and underflow it when
> max_huge_pages is zero. Keep max_huge_pages unchanged for surplus
> folios, including the vmemmap restoration rollback path.
>
> Fixes: cb402bbdabca ("mm/hugetlb: fix surplus pages in dissolve_free_huge_page()")
> Assisted-by: Codex:gpt-5.6-sol
> Signed-off-by: Longlong Xia <xialonglong@kylinos.cn>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Thanks.
prev parent reply other threads:[~2026-08-15 3:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 8:30 [PATCH 1/1] mm/hugetlb: keep max_huge_pages when dissolving surplus folios Longlong Xia
2026-08-14 18:40 ` Andrew Morton
2026-08-15 3:54 ` Muchun Song [this message]
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=A277EA38-31EF-4252-BA17-6B8A18DB6174@linux.dev \
--to=muchun.song@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=tujinjiang@huawei.com \
--cc=xialonglong2025@163.com \
--cc=xialonglong@kylinos.cn \
/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