From: Li Wang <li.wang@linux.dev>
To: Huaisheng Ye <yehuaisheng@open-hieco.net>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/3] hugemmap10: Account for memory policy in private fault checks
Date: Thu, 8 Oct 2026 17:40:22 +0800 [thread overview]
Message-ID: <asdlBnDpEw2xeuRL@linux.dev> (raw)
In-Reply-To: <20260929072412.20979-4-yehuaisheng@open-hieco.net>
Huaisheng Ye wrote:
> Kernels without private mmap-time reservations or with flags MAP_NORESERVE
> create the reservation when the private VMA first faults. With MPOL_BIND,
> globally free hugepages can be outside the allowed nodes, so this fault
> can create surplus pages even when the global counters appear sufficient.
>
> $ numactl --cpunodebind=0 --membind=2 ./hugemmap10 -n
> tst_hugepage.c:84: TINFO: 3 hugepage(s) reserved
> tst_tmpdir.c:308: TINFO: Using /tmp/LTP_hugdeSTgL as tmpdir (xfs filesystem)
> tst_test.c:1218: TINFO: Mounting none to /tmp/LTP_hugdeSTgL/hugetlbfs fstyp=hugetlbfs flags=0
> tst_test.c:2048: TINFO: LTP version: 20260529-237-g132c8b0a8
> tst_test.c:2051: TINFO: Tested kernel: 7.3.0-rc1-test-32+ #33 SMP PREEMPT Mon Sep 7 11:50:02 CST 2026 x86_64
> tst_kconfig.c:90: TINFO: Parsing kernel config '/proc/config.gz'
> tst_test.c:1876: TINFO: Overall timeout per run is 0h 00m 30s
> hugemmap10.c:498: TINFO: Base pool size: 0
> hugemmap10.c:425: TINFO: Clean...
> hugemmap10.c:476: TINFO: OK
> hugemmap10.c:425: TINFO: Untouched, shared...
> hugemmap10.c:476: TINFO: OK
> hugemmap10.c:425: TINFO: Untouched, private...
> hugemmap10.c:476: TINFO: OK
> hugemmap10.c:425: TINFO: Touched, shared...
> hugemmap10.c:476: TINFO: OK
> hugemmap10.c:425: TINFO: Touched, private...
> hugemmap10.c:476: TINFO: OK
> hugemmap10.c:498: TINFO: Base pool size: 1
> hugemmap10.c:425: TINFO: Clean...
> hugemmap10.c:448: TFAIL: While touching the addr after mmap private: Bad HugePages_Total: expected 1, actual 2
> hugemmap10.c:448: TFAIL: While touching the addr after mmap private: Bad HugePages_Free: expected 0, actual 1
> hugemmap10.c:448: TFAIL: While touching the addr after mmap private: Bad HugePages_Surp: expected 0, actual 1
>
> Summary:
> passed 0
> failed 3
> broken 0
> skipped 0
> warnings 0
>
> Get free hugepages on allowed nodes before touching an unreserved
> private mapping and use the maximum of the global and allowed-node
> shortfalls to calculate the expected counters.
>
> Signed-off-by: Huaisheng Ye <yehuaisheng@open-hieco.net>
Nice fix!
Reviewed-by: Li Wang <li.wang@linux.dev>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-10-08 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 7:24 [LTP] [PATCH v2 0/3] hugemmap10: Account for memory policy in counter checks Huaisheng Ye
2026-09-29 7:24 ` [LTP] [PATCH v2 1/3] hugemmap10: Account for memory policy in mmap " Huaisheng Ye
2026-09-29 11:18 ` [LTP] " linuxtestproject.agent
2026-10-08 8:26 ` [LTP] [PATCH v2 1/3] " Li Wang
2026-09-29 7:24 ` [LTP] [PATCH v2 2/3] hugemmap10: Add private MAP_NORESERVE test mode Huaisheng Ye
2026-10-08 9:09 ` Li Wang
2026-09-29 7:24 ` [LTP] [PATCH v2 3/3] hugemmap10: Account for memory policy in private fault checks Huaisheng Ye
2026-10-08 9:40 ` Li Wang [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=asdlBnDpEw2xeuRL@linux.dev \
--to=li.wang@linux.dev \
--cc=ltp@lists.linux.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.