Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v4 0/3] hugemmap10: Account for memory policy in counter checks
@ 2026-10-26  7:07 Huaisheng Ye
  2026-10-26  7:07 ` [LTP] [PATCH v4 1/3] hugemmap10: Account for memory policy in mmap " Huaisheng Ye
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Huaisheng Ye @ 2026-10-26  7:07 UTC (permalink / raw)
  To: li.wang, chrubis, pvorel; +Cc: ltp

The hugetlb reservation fix allocates surplus hugepages when global free
pages are outside nodes allowed by the current cpuset and MPOL_BIND policy.
This series updates hugemmap10's global counter expectations to match that
behavior.

Patch 1 fixes mappings that create their reservation at mmap() time. Patches
2 and 3 add and validate a MAP_NORESERVE private-mapping mode, which lets the
test exercise fault-time allocation without booting a kernel that lacks
private mmap-time reservations.

Changes in v4:
- Rebase onto 05aebc377 ("sys_hwmon01: always report a result").
- Preserve the memory policy mode flags and resolve MPOL_F_RELATIVE_NODES
  masks against the current allowed memory nodes using nodes_fold() and
  nodes_onto() semantics before checking overlap or counting free pages.
- Give hugemmap10 -n the distinct runtest identifier hugemmap10_noreserve
  so session restore and reboot recovery track both invocations separately.
- Correct comments and commit messages to describe MAP_NORESERVE faults as
  allocating unreserved hugepages, without creating a mapping reservation
  or changing HugePages_Rsvd.
- Collect Reviewed-by in 2/3.

Changes in v3:
- Rebase onto 113594f53 ("hugemmap10: Treat fd 0 as valid in cleanup").
- Add hugemmap10 -n to runtest/hugetlb so the default suite exercises the
  private fault-time allocation path.
- Remove the redundant private_noreserve variable and use
  private_noreserve_opt directly to detect -n.
- Define MAP_TYPE in lapi/mmap.h when libc headers lack it, and include
  that header in hugemmap10.c.
- Collect Reviewed-by in 1/3 and 3/3.

Tested on an eight-node system running v7.3, with cpuset
{3,5,6}: both default and -n invocations pass with relative MPOL_BIND {1,2}
and ordinary MPOL_BIND {5,6}. An additional -n run with relative {0,4}
also passes, exercising folding to physical nodes {3,5}.

v3: https://lore.kernel.org/all/20261010095155.117953-2-yehuaisheng@open-hieco.net/
v2: https://lore.kernel.org/all/20260929072412.20979-1-yehuaisheng@open-hieco.net/

Huaisheng Ye (3):
  hugemmap10: Account for memory policy in mmap counter checks
  hugemmap10: Add private MAP_NORESERVE test mode
  hugemmap10: Account for memory policy in private fault checks

 include/lapi/mmap.h                           |   4 +
 runtest/hugetlb                               |   1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap10.c  | 194 ++++++++++++++++--
 3 files changed, 184 insertions(+), 15 deletions(-)

-- 
2.52.0

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-28  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26  7:07 [LTP] [PATCH v4 0/3] hugemmap10: Account for memory policy in counter checks Huaisheng Ye
2026-10-26  7:07 ` [LTP] [PATCH v4 1/3] hugemmap10: Account for memory policy in mmap " Huaisheng Ye
2026-10-26  9:40   ` [LTP] " linuxtestproject.agent
2026-10-26  7:07 ` [LTP] [PATCH v4 2/3] hugemmap10: Add private MAP_NORESERVE test mode Huaisheng Ye
2026-10-26  7:07 ` [LTP] [PATCH v4 3/3] hugemmap10: Account for memory policy in private fault checks Huaisheng Ye
2026-10-28  9:10 ` [LTP] [PATCH v4 0/3] hugemmap10: Account for memory policy in counter checks Li Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox