[PATCH v2 0/4] add anon mTHP collapse test cases

Baolin Wang posted 4 patches 2 months ago
There is a newer version of this series
.../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          | 185 ++++++++++++++++-
tools/testing/selftests/mm/vm_util.h          |   8 +-
10 files changed, 344 insertions(+), 192 deletions(-)
[PATCH v2 0/4] add anon mTHP collapse test cases
Posted by Baolin Wang 2 months ago
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/cover.1781083630.git.baolin.wang@linux.alibaba.com/

Changes from v1:
- Add order and hpage_size check (per Sashiko).
- Change to use THP_MADVISE for mTHP collapse (per Sashiko).

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          | 185 ++++++++++++++++-
 tools/testing/selftests/mm/vm_util.h          |   8 +-
 10 files changed, 344 insertions(+), 192 deletions(-)

-- 
2.47.3
Re: [PATCH v2 0/4] add anon mTHP collapse test cases
Posted by Kiryl Shutsemau 1 month, 4 weeks ago
On Sat, Aug 01, 2026 at 02:26:34PM +0800, Baolin Wang wrote:
> 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.

The patchset looks good to me:

Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>

Thanks for doing this.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Re: [PATCH v2 0/4] add anon mTHP collapse test cases
Posted by Baolin Wang 1 month, 4 weeks ago

On 8/5/26 11:14 PM, Kiryl Shutsemau wrote:
> On Sat, Aug 01, 2026 at 02:26:34PM +0800, Baolin Wang wrote:
>> 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.
> 
> The patchset looks good to me:
> 
> Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>

Thanks Kiryl.
Re: [PATCH v2 0/4] add anon mTHP collapse test cases
Posted by Nico Pache (Red Hat) 1 month, 4 weeks ago
> 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.

Thank you for sending this out :) I played around with it and it seems
to be working. This lays good groundwork to expand khugepaged mTHP testing
in the future too.

Tested-by: Nico Pache (Red Hat) <nico.pache@linux.dev>

-- 
Nico Pache (Red Hat) <nico.pache@linux.dev>
Re: [PATCH v2 0/4] add anon mTHP collapse test cases
Posted by Baolin Wang 1 month, 4 weeks ago

On 8/5/26 4:38 AM, Nico Pache (Red Hat) wrote:
>> 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.
> 
> Thank you for sending this out :) I played around with it and it seems
> to be working. This lays good groundwork to expand khugepaged mTHP testing
> in the future too.
> 
> Tested-by: Nico Pache (Red Hat) <nico.pache@linux.dev>

Thanks Nico :)