* [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix
@ 2026-11-16 10:15 Huaisheng Ye
2026-11-16 12:10 ` [LTP] " linuxtestproject.agent
2026-11-16 12:52 ` [LTP] [PATCH] " Cyril Hrubis
0 siblings, 2 replies; 4+ messages in thread
From: Huaisheng Ye @ 2026-11-16 10:15 UTC (permalink / raw)
To: li.wang, chrubis, pvorel; +Cc: ltp
Tag Linux commit 21f514ad520459fbfa58ccdf171bb68148c2f5aa, which fixes
hugetlb mappings when free huge pages are outside the nodes allowed by the
task's cpuset or MPOL_BIND policy.
Before the fix, gathering surplus pages considered only global counters, so
mmap() could fail with ENOMEM even when nr_overcommit_hugepages allowed
surplus pages on the permitted nodes.
Document the regression and its NUMA reproduction command in the test.
Signed-off-by: Huaisheng Ye <yehuaisheng@open-hieco.net>
---
.../kernel/mem/hugetlb/hugemmap/hugemmap10.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap10.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap10.c
index c66b07039..c3e0984d4 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap10.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap10.c
@@ -12,6 +12,20 @@
* successful, the test passes.
*/
+/*
+ * This test also covers the NUMA regression fixed by Linux commit
+ * 21f514ad520459fbfa58ccdf171bb68148c2f5aa. If free huge pages are outside
+ * the nodes allowed by the task's cpuset or MPOL_BIND policy, hugetlb must
+ * account for the allowed-node shortfall when gathering surplus pages.
+ * Otherwise mmap() may fail with ENOMEM even when nr_overcommit_hugepages
+ * permits allocating surplus pages on the allowed nodes.
+ *
+ * The issue can be exercised on a system with two or more NUMA nodes, for
+ * example with:
+ *
+ * numactl --cpunodebind=0 --membind=1 ./hugemmap10
+ */
+
#define _GNU_SOURCE
#include <errno.h>
#include <linux/mempolicy.h>
@@ -602,6 +616,10 @@ static void cleanup(void)
}
static struct tst_test test = {
+ .tags = (struct tst_tag[]) {
+ {"linux-git", "21f514ad520459fbfa58ccdf171bb68148c2f5aa"},
+ {}
+ },
.needs_root = 1,
.options = (struct tst_option[]) {
{"n", &private_noreserve_opt,
--
2.52.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] hugemmap10: Add linux-git tag for NUMA fix
2026-11-16 10:15 [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix Huaisheng Ye
@ 2026-11-16 12:10 ` linuxtestproject.agent
2026-11-16 12:52 ` [LTP] [PATCH] " Cyril Hrubis
1 sibling, 0 replies; 4+ messages in thread
From: linuxtestproject.agent @ 2026-11-16 12:10 UTC (permalink / raw)
To: Huaisheng Ye; +Cc: ltp
Hi Huaisheng,
On Mon, Nov 16, 2026 at 06:15:59PM +0800, Huaisheng Ye wrote:
> hugemmap10: Add linux-git tag for NUMA fix
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix
2026-11-16 10:15 [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix Huaisheng Ye
2026-11-16 12:10 ` [LTP] " linuxtestproject.agent
@ 2026-11-16 12:52 ` Cyril Hrubis
2026-11-18 2:02 ` Huaisheng Ye
1 sibling, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2026-11-16 12:52 UTC (permalink / raw)
To: Huaisheng Ye; +Cc: ltp
Hi!
> +/*
> + * This test also covers the NUMA regression fixed by Linux commit
> + * 21f514ad520459fbfa58ccdf171bb68148c2f5aa. If free huge pages are outside
> + * the nodes allowed by the task's cpuset or MPOL_BIND policy, hugetlb must
> + * account for the allowed-node shortfall when gathering surplus pages.
> + * Otherwise mmap() may fail with ENOMEM even when nr_overcommit_hugepages
> + * permits allocating surplus pages on the allowed nodes.
> + *
> + * The issue can be exercised on a system with two or more NUMA nodes, for
> + * example with:
> + *
> + * numactl --cpunodebind=0 --membind=1 ./hugemmap10
If nothing else, this text should be part of the doc comment just above
it so that it's properly exported to documentation.
Also if the test needs to be bind to specific nodes to reproduce the
problem, it would make sense (in a separate patch) to add a subtest to
the test so that we can test it properly.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix
2026-11-16 12:52 ` [LTP] [PATCH] " Cyril Hrubis
@ 2026-11-18 2:02 ` Huaisheng Ye
0 siblings, 0 replies; 4+ messages in thread
From: Huaisheng Ye @ 2026-11-18 2:02 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
On 11/16/2026 8:52 PM, Cyril Hrubis wrote:
> Hi!
>> +/*
>> + * This test also covers the NUMA regression fixed by Linux commit
>> + * 21f514ad520459fbfa58ccdf171bb68148c2f5aa. If free huge pages are outside
>> + * the nodes allowed by the task's cpuset or MPOL_BIND policy, hugetlb must
>> + * account for the allowed-node shortfall when gathering surplus pages.
>> + * Otherwise mmap() may fail with ENOMEM even when nr_overcommit_hugepages
>> + * permits allocating surplus pages on the allowed nodes.
>> + *
>> + * The issue can be exercised on a system with two or more NUMA nodes, for
>> + * example with:
>> + *
>> + * numactl --cpunodebind=0 --membind=1 ./hugemmap10
> If nothing else, this text should be part of the doc comment just above
> it so that it's properly exported to documentation.
Got it.
> Also if the test needs to be bind to specific nodes to reproduce the
> problem, it would make sense (in a separate patch) to add a subtest to
> the test so that we can test it properly.
>
Noted for later action, thanks.
Huaisheng Ye
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-18 2:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 10:15 [LTP] [PATCH] hugemmap10: Add linux-git tag for NUMA fix Huaisheng Ye
2026-11-16 12:10 ` [LTP] " linuxtestproject.agent
2026-11-16 12:52 ` [LTP] [PATCH] " Cyril Hrubis
2026-11-18 2:02 ` Huaisheng Ye
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox