mm: Add selftests for migration entries
Subsystems (2)
PATCH 1/1 mm: Add selftests for migration entries
Add some basic migration tests and in particular tests that will stress both the pte and pmd migration entry wait paths.
Signed-off-by Alistair Popple <[email protected]>
---
This is a clean-up of an ad-hoc test I had written to test and understand the migration entry code paths. I think it would also be useful to have upstream so these code paths could be more regularly and easily exerciesed.
For example these tests directly found an issue with linux-next f886cdb76920 ("mm: pvmw: add support for walking devmap pages").
tools/testing/selftests/vm/Makefile | 3 + tools/testing/selftests/vm/migration.c | 193 +++++++++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 tools/testing/selftests/vm/migration.c
tools/testing/selftests/vm/Makefile +3 -0
@@ -41,6 +41,7 @@ TEST_GEN_FILES += map_fixed_noreplace TEST_GEN_FILES += map_hugetlb TEST_GEN_FILES += map_populate TEST_GEN_FILES += memfd_secret +TEST_GEN_FILES += migration TEST_GEN_FILES += mlock-random-test TEST_GEN_FILES += mlock2-tests TEST_GEN_FILES += mremap_dontunmap
@@ -149,6 +150,8 @@ $(OUTPUT)/hmm-tests: LDLIBS += $(HMM_EXTRA_LIBS) $(OUTPUT)/ksm_tests: LDLIBS += -lnuma +$(OUTPUT)/migration: LDLIBS += -lnuma + local_config.mk local_config.h: check_config.sh /bin/sh ./check_config.sh $(CC)
tools/testing/selftests/vm/migration.c new file +193 -0
193 lines not on this page · raw message
Signature · 1 line
2.34.1