From: Huaisheng Ye <yehuaisheng@open-hieco.net>
To: Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>
Cc: osalvador@suse.de, linux-mm@kvack.org, david@kernel.org,
linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: account for allowed nodes when gathering surplus pages
Date: Fri, 11 Sep 2026 16:19:29 +0800 [thread overview]
Message-ID: <17ebffd9-1ec3-4a34-85b5-fa00eb516478@open-hieco.net> (raw)
In-Reply-To: <35D58CFB-BC97-4245-A387-DB3077E395C3@linux.dev>
On 9/11/2026 10:41, Muchun Song wrote:
>
>> On Sep 11, 2026, at 06:20, Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>> On Thu, 10 Sep 2026 16:48:56 +0800 Muchun Song <muchun.song@linux.dev> wrote:
>>
>>>> This fixes hugetlb mappings when, for example, a task runs with
>>>> MPOL_BIND on Node 1 while the existing free huge pages are on Node 0.
>>>>
>>>> Similar issue also could be found in ltp if the free pages of global pool
>>>> reside outside the nodes allowed by the application.
>>>> # cd ltp/testcases/kernel/mem/hugetlb/hugemmap/
>>>> # numactl --cpunodebind=0 --membind=1 ./hugemmap10
>>>>
>>>> Signed-off-by: Huaisheng Ye <yehuaisheng@open-hieco.net>
>>> Acked-by: Muchun Song <muchun.song@linux.dev>
>> Should we backport this?
>>
>> If so, a Fixes: target would be helpful.
> I believe the fix should be e4e574b767ba ("hugetlb: Try to grow hugetlb
> pool for MAP_SHARED mappings"). This commit was introduced back in 2007.
> Regarding the impact of this issue, I consulted an AI:
>
> Severity: Medium
> Impact: valid HugeTLB mappings can be rejected with ENOMEM
> Scope: NUMA + cpuset/MPOL_BIND + nr_overcommit_hugepages
> Risk: availability/configuration failure, no data corruption
>
>
> The fact that it has only been triggered after such a long time also
> precisely shows how uncommon its configuration is. I expect that
> backporting may encounter some conflicts. In the absence of clear user
> feedback, I personally suggest not doing a backport.
>
> Of course, as the author of this patch, you could also provide more
> information, for example, whether it was discovered as a real issue
> in a production environment, so as to decide whether to proceed with
> a backport.
We found this defect when doing the hugemmap10 test of LTP, it appears
with a certain probability (5%) in scenarios involving multiple NUMA nodes.
After debugging, I believe its occurrence is related to the location of
the regular huge page pool and the MPOL_BIND strategy used for allocating
surplus pages.
So I moved to hugetlb-mmap with some simple setup steps to make it reproduce stably.
A more realistic scenario I have in mind is this, user uses huge pages in memory
pooling solutions like CXL memory expander or others, if there are already some
regular
huge pages locates on the local node, but user wants to restrict application to use
surplus pages from remote nodes — and that's when the failure occurs.
CC linux-cxl.
BRs,
Huaisheng Ye
next prev parent reply other threads:[~2026-09-11 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 7:46 Huaisheng Ye
2026-09-10 8:48 ` Muchun Song
2026-09-10 22:20 ` Andrew Morton
2026-09-11 2:41 ` Muchun Song
2026-09-11 8:19 ` Huaisheng Ye [this message]
2026-09-17 10:04 ` Li Wang
2026-09-17 10:04 ` Li Wang
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=17ebffd9-1ec3-4a34-85b5-fa00eb516478@open-hieco.net \
--to=yehuaisheng@open-hieco.net \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
/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®