From: Andrew Morton <akpm@linux-foundation.org>
To: Longlong Xia <xialonglong2025@163.com>
Cc: muchun.song@linux.dev, osalvador@suse.de, david@kernel.org,
mike.kravetz@oracle.com, yuzhao@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Longlong Xia <xialonglong@kylinos.cn>
Subject: Re: [PATCH 0/2] mm/hugetlb: fix surplus accounting and availability checks during demotion
Date: Fri, 28 Aug 2026 16:10:42 -0700 [thread overview]
Message-ID: <20260828161042.de43f4751296883eeca633a6@linux-foundation.org> (raw)
In-Reply-To: <20260823034307.1072415-1-xialonglong2025@163.com>
On Sun, 23 Aug 2026 11:43:05 +0800 Longlong Xia <xialonglong2025@163.com> wrote:
> This series fixes two problems in the hugetlb demote path.
>
> Patch 1 fixes surplus accounting in the source hstate.
> demote_pool_huge_page() removes every source folio as a persistent
> folio, but a free folio may instead account for one of the source
> hstate's surplus pages (for example after a vmemmap restoration
> failure). Removing such a folio without adjusting surplus_huge_pages
> makes the persistent count underflow, and later subtracting it from
> max_huge_pages can underflow that counter as well.
>
> Patch 2 fixes an availability overcount in the sysfs demote path. The
> sysfs trigger checks whether any page is available but then passes the
> entire request to demote_pool_huge_page(), which can remove free huge
> pages that back existing reservations. With two free pages and one
> reservation, a request for two pages removes both and leaves the
> reservation without a backing page.
Thanks. Have you created and tested reproducers for these? Gemini was
trivially able to do this for me.
If so, it would be helpful to includes the details in the
changelogging.
prev parent reply other threads:[~2026-08-28 23:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 3:43 [PATCH 0/2] mm/hugetlb: fix surplus accounting and availability checks during demotion Longlong Xia
2026-08-23 3:43 ` [PATCH 1/2] mm/hugetlb: preserve source surplus accounting " Longlong Xia
2026-08-23 3:43 ` [PATCH 2/2] mm/hugetlb: cap demotion at currently available free pages Longlong Xia
2026-08-28 23:10 ` Andrew Morton [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=20260828161042.de43f4751296883eeca633a6@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=xialonglong2025@163.com \
--cc=xialonglong@kylinos.cn \
--cc=yuzhao@google.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