linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Better split_huge_page_test result check
@ 2025-08-08 19:01 Zi Yan
  2025-08-08 19:01 ` [PATCH v2 1/3] mm/huge_memory: add new_order and offset to split_huge_pages*() pr_debug Zi Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Zi Yan @ 2025-08-08 19:01 UTC (permalink / raw)
  To: Wei Yang, wang lian, Baolin Wang, David Hildenbrand, linux-mm
  Cc: Andrew Morton, Lorenzo Stoakes, Zi Yan, Liam R. Howlett,
	Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Vlastimil Babka,
	Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Shuah Khan,
	linux-kernel, linux-kselftest

This patchset uses kpageflags to get after-split folio orders for a better
split_huge_page_test result check[1]. The added gather_folio_orders() scans
through a VPN range and collects the numbers of folios at different orders.
check_folio_orders() compares the result of gather_folio_orders() to
a given list of numbers of different orders.

This patchset also added new order and in folio offset to the split huge
page debugfs's pr_debug()s;

Changelog
===
From V1[2]:
1. Dropped split_huge_pages_pid() for loop step change to avoid messing
   up with PTE-mapped THP handling. split_huge_page_test.c is changed to
   perform split at [addr, addr + pagesize) range to limit one
   folio_split() per folio.
2. Moved pr_debug changes in Patch 2 to Patch 1.
3. Moved KPF_* to vm_util.h and used PAGEMAP_PFN instead of local PFN_MASK.
4. Used pagemap_get_pfn() helper.
5. Used char *vaddr and size_t len as inputs to gather_folio_orders() and
   check_folio_orders() instead of vpn and nr_pages.
6. Removed variable length variables and used malloc instead.

[1] https://lore.kernel.org/linux-mm/e2f32bdb-e4a4-447c-867c-31405cbba151@redhat.com/
[2] https://lore.kernel.org/linux-mm/20250806022045.342824-1-ziy@nvidia.com/


Zi Yan (3):
  mm/huge_memory: add new_order and offset to split_huge_pages*()
    pr_debug.
  selftests/mm: add check_folio_orders() helper.
  selftests/mm: check after-split folio orders in split_huge_page_test.

 mm/huge_memory.c                              |   8 +-
 .../selftests/mm/split_huge_page_test.c       | 102 ++++++++++----
 tools/testing/selftests/mm/vm_util.c          | 133 ++++++++++++++++++
 tools/testing/selftests/mm/vm_util.h          |   7 +
 4 files changed, 217 insertions(+), 33 deletions(-)

-- 
2.47.2



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

end of thread, other threads:[~2025-08-11 21:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08 19:01 [PATCH v2 0/3] Better split_huge_page_test result check Zi Yan
2025-08-08 19:01 ` [PATCH v2 1/3] mm/huge_memory: add new_order and offset to split_huge_pages*() pr_debug Zi Yan
2025-08-09 18:45   ` Wei Yang
2025-08-10 16:55   ` Donet Tom
2025-08-11  1:32   ` wang lian
2025-08-11  6:45   ` Baolin Wang
2025-08-11  6:58   ` Barry Song
2025-08-11  7:55   ` David Hildenbrand
2025-08-08 19:01 ` [PATCH v2 2/3] selftests/mm: add check_folio_orders() helper Zi Yan
2025-08-09 20:18   ` Wei Yang
2025-08-11 18:39     ` Zi Yan
2025-08-11 21:28       ` Wei Yang
2025-08-10 16:49   ` Donet Tom
2025-08-11 18:40     ` Zi Yan
2025-08-11  7:52   ` Baolin Wang
2025-08-11 18:41     ` Zi Yan
2025-08-08 19:01 ` [PATCH v2 3/3] selftests/mm: check after-split folio orders in split_huge_page_test Zi Yan
2025-08-10 16:53   ` Donet Tom
2025-08-11 18:20     ` Zi Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).