Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Muchun Song <muchun.song@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>,
	Huaisheng Ye <yehuaisheng@open-hieco.net>
Cc: osalvador@suse.de, linux-mm@kvack.org, david@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: account for allowed nodes when gathering surplus pages
Date: Fri, 11 Sep 2026 10:41:01 +0800	[thread overview]
Message-ID: <35D58CFB-BC97-4245-A387-DB3077E395C3@linux.dev> (raw)
In-Reply-To: <20260910152026.5bcf5c5d7f1ecdcb0147ceaf@linux-foundation.org>



> 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.

Thanks.

  reply	other threads:[~2026-09-11  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  7:46 [PATCH] mm/hugetlb: account for allowed nodes when gathering surplus pages Huaisheng Ye
2026-09-10  8:48 ` Muchun Song
2026-09-10 22:20   ` Andrew Morton
2026-09-11  2:41     ` Muchun Song [this message]
2026-09-11  8:19       ` Huaisheng Ye

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=35D58CFB-BC97-4245-A387-DB3077E395C3@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=yehuaisheng@open-hieco.net \
    /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