This patchset is split from the previous shmem mTHP collapse patchset[1], which only adds anon mTHP collapse selftests. All khugepaged test cases can pass.
[1] https://lore.kernel.org/all/[email protected]/ Baolin Wang (4): selftests: mm: extend the check_huge() to support mTHP check selftests: mm: move gather_after_split_folio_orders() into vm_util.c file selftests: mm: implement the mTHP-sized hugepage check helpers selftests: mm: add mTHP collapse test cases .../selftests/mm/folio_split_race_test.c | 2 +- tools/testing/selftests/mm/khugepaged.c | 190 +++++++++++++----- tools/testing/selftests/mm/pagemap_ioctl.c | 2 +- .../testing/selftests/mm/prctl_thp_disable.c | 2 +- tools/testing/selftests/mm/run_vmtests.sh | 2 + tools/testing/selftests/mm/soft-dirty.c | 2 +- .../selftests/mm/split_huge_page_test.c | 139 +------------ tools/testing/selftests/mm/uffd-common.c | 4 +- tools/testing/selftests/mm/vm_util.c | 180 ++++++++++++++++- tools/testing/selftests/mm/vm_util.h | 8 +- 10 files changed, 339 insertions(+), 192 deletions(-) -- 2.47.3

