Skip to content

selftests/vm: test COW handling of anonymous memory

David Hildenbrand linux-kselftest linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 6 repliesIn review 5 of 7 applied

Patches in v1 5 of 7 applied

#Subject and filesSizeRepliesApplied
1/7selftests/vm: anon_cow: test COW handling of anonymous memorytools/testing/selftests/vm/.gitignore tools/testing/selftests/vm/Makefile tools/testing/selftests/vm/anon_cow.c +3 more+416 -13 replies
2/7selftests/vm: factor out pagemap_is_populated() into vm_utiltools/testing/selftests/vm/madv_populate.c tools/testing/selftests/vm/vm_util.c tools/testing/selftests/vm/vm_util.h+9 -80 repliesApplied
3/7selftests/vm: anon_cow: THP teststools/testing/selftests/vm/anon_cow.c+258 -10 repliesApplied
4/7selftests/vm: anon_cow: hugetlb teststools/testing/selftests/vm/anon_cow.c+69 -10 repliesApplied
5/7selftests/vm: anon_cow: add liburing test casestools/testing/selftests/vm/Makefile tools/testing/selftests/vm/anon_cow.c tools/testing/selftests/vm/check_config.sh+241 -11 reply
6/7mm/gup_test: start/stop/read functionality for PIN LONGTERM testmm/gup_test.c mm/gup_test.h+152 -00 repliesApplied
7/7selftests/vm: anon_cow: add R/O longterm tests via gup_testtools/testing/selftests/vm/anon_cow.c+210 -02 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/7] selftests/vm: test COW handling of anonymous memory

On top of mm-stable.

This is my current set of tests for testing COW handling of anonymous memory, especially when interacting with GUP. I developed these tests while working on PageAnonExclusive and managed to clean them up just now.

On current upstream Linux, all tests pass except the hugetlb tests that rely on vmsplice -- these tests should pass as soon as vmsplice properly uses FOLL_PIN instead of FOLL_GET.

I'm working on additional tests for COW handling in private mappings, focusing on long-term R/O pinning e.g., of the shared zeropage, pagecache pages and KSM pages. These tests, however, will go into a different file. So this is everything I have regarding tests for anonymous memory.

Cc Andrew Morton <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc John Hubbard <[email protected]>
Cc Nadav Amit <[email protected]>
Cc Peter Xu <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Christoph von Recklinghausen <[email protected]>
Cc Don Dutile <[email protected]>

David Hildenbrand (7):
selftests/vm: anon_cow: test COW handling of anonymous memory selftests/vm: factor out pagemap_is_populated() into vm_util selftests/vm: anon_cow: THP tests
selftests/vm: anon_cow: hugetlb tests
selftests/vm: anon_cow: add liburing test cases mm/gup_test: start/stop/read functionality for PIN LONGTERM test selftests/vm: anon_cow: add R/O longterm tests via gup_test

 mm/gup_test.c                              |  140 +++
 mm/gup_test.h                              |   12 +
 tools/testing/selftests/vm/.gitignore      |    1 +
 tools/testing/selftests/vm/Makefile        |   25 +-
 tools/testing/selftests/vm/anon_cow.c      | 1126 ++++++++++++++++++++
 tools/testing/selftests/vm/check_config.sh |   31 +
 tools/testing/selftests/vm/madv_populate.c |    8 -
 tools/testing/selftests/vm/run_vmtests.sh  |    3 +
 tools/testing/selftests/vm/vm_util.c       |   15 +
 tools/testing/selftests/vm/vm_util.h       |    2 +
 10 files changed, 1353 insertions(+), 10 deletions(-)
 create mode 100644 tools/testing/selftests/vm/anon_cow.c
 create mode 100644 tools/testing/selftests/vm/check_config.sh
Signature · 1 line
2.37.3