Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 0/3] hugemmap10: Account for memory policy in counter checks
@ 2026-09-29  7:24 Huaisheng Ye
  2026-09-29  7:24 ` [LTP] [PATCH v2 1/3] hugemmap10: Account for memory policy in mmap " Huaisheng Ye
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Huaisheng Ye @ 2026-09-29  7:24 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 reservations without booting an older kernel.

Changes in v2:
- Expand the v1 change[1] from mmap-time to private fault-time accounting
  patches, with the MAP_NORESERVE test mode between them.
- Match hugetlb's MPOL_BIND behavior when its policy mask no longer overlaps
  the current cpuset: fall back to the cpuset mask instead of treating the
  allowed set as empty.
- Normalize nodemask bit tests to avoid truncating bits in the upper half of
  an unsigned long on 64-bit systems.
- Add -n to map only private VMAs with MAP_NORESERVE. The reservation probe
  uses the same flags, so the private_resv debug report reflects the actual
  private mapping behavior. MAP_SHARED mappings are unchanged.
- Account for the allowed-node shortfall when an unreserved private mapping
  first faults in touch_(), and share the reservation predicate with unmap_().

[1] https://lore.kernel.org/ltp/20260914032359.9956-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

 .../kernel/mem/hugetlb/hugemmap/hugemmap10.c  | 156 ++++++++++++++++--
 1 file changed, 141 insertions(+), 15 deletions(-)

-- 
2.52.0


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

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox