[PATCH v2 0/3] selftests/mm: assorted fixes for hmm-tests

Aboorva Devarajan posted 3 patches 5 days, 22 hours ago
tools/testing/selftests/mm/hmm-tests.c | 104 ++++++++++++++++++-------
1 file changed, 76 insertions(+), 28 deletions(-)
[PATCH v2 0/3] selftests/mm: assorted fixes for hmm-tests
Posted by Aboorva Devarajan 5 days, 22 hours ago
Hi all,

This series fixes a few issues in hmm-tests that show up when
page-size and huge-page configuration differ from the hardcoded
assumptions the tests were written for (PMD/THP sizing, default
hugepage size, and related cases).

It also includes a fix to exclusive_cow: the test ignored the return
value of fork(), so both parent and child ran the same teardown path.

v1: https://lore.kernel.org/all/cover.1777870179.git.aboorvad@linux.ibm.com/

Changes in v2:
- Patches 1 and 3 are unchanged.
- Patch 2: fall back to TWOMEG when read_pmd_pagesize() returns zero,
  use a fixed-size array to avoid non-constant initialisers, and skip
  benchmark sizes that exceed INT_MAX instead of capping the THP count
  at runtime.

Please let us know if you have any comments.

Thanks,
Aboorva

Aboorva Devarajan (1):
  selftests/mm: fix exclusive_cow test fork() handling

Sayali Patil (2):
  selftests/mm: allow PUD-level entries in compound testcase of hmm
    tests
  selftests/mm: remove hardcoded THP sizing assumptions in hmm tests

 tools/testing/selftests/mm/hmm-tests.c | 104 ++++++++++++++++++-------
 1 file changed, 76 insertions(+), 28 deletions(-)

-- 
2.54.0
Re: [PATCH v2 0/3] selftests/mm: assorted fixes for hmm-tests
Posted by Andrew Morton 5 days, 8 hours ago
On Tue, 19 May 2026 09:36:21 +0530 Aboorva Devarajan <aboorvad@linux.ibm.com> wrote:

> This series fixes a few issues in hmm-tests that show up when
> page-size and huge-page configuration differ from the hardcoded
> assumptions the tests were written for (PMD/THP sizing, default
> hugepage size, and related cases).
> 
> It also includes a fix to exclusive_cow: the test ignored the return
> value of fork(), so both parent and child ran the same teardown path.

Thanks.

A lot of people weren't cc'ed.  get_maintainer tells me

Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Liam R. Howlett" <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Shuah Khan <shuah@kernel.org>

Jason and Leon, particularly.

Also, get_maintainer isn't super precise.  A scan of the `git blame'
output indicates that Ralph, Balbir, Alex, Matthew and Alistair might
appreciate a cc.

AI review asked one question:
	https://sashiko.dev/#/patchset/cover.1779090293.git.aboorvad@linux.ibm.com