Skip to content

Commit b2ef9f5

Browse files
Ralph Campbelljgunthorpe
authored andcommitted
mm/hmm/test: add selftest driver for HMM
This driver is for testing device private memory migration and devices which use hmm_range_fault() to access system memory via device page tables. Link: https://lore.kernel.org/r/20200422195028.3684-2-rcampbell@nvidia.com Link: https://lore.kernel.org/r/20200516010424.2013-1-rcampbell@nvidia.com Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Link: https://lore.kernel.org/r/20200509030225.14592-1-weiyongjun1@huawei.com Link: https://lore.kernel.org/r/20200509030234.14747-1-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200511183704.GA225608@mwanda Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 2733ea1 commit b2ef9f5

4 files changed

Lines changed: 1237 additions & 0 deletions

File tree

‎lib/Kconfig.debug‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,19 @@ config TEST_MEMINIT
22012201

22022202
If unsure, say N.
22032203

2204+
config TEST_HMM
2205+
tristate "Test HMM (Heterogeneous Memory Management)"
2206+
depends on TRANSPARENT_HUGEPAGE
2207+
depends on DEVICE_PRIVATE
2208+
select HMM_MIRROR
2209+
select MMU_NOTIFIER
2210+
help
2211+
This is a pseudo device driver solely for testing HMM.
2212+
Say M here if you want to build the HMM test module.
2213+
Doing so will allow you to run tools/testing/selftest/vm/hmm-tests.
2214+
2215+
If unsure, say N.
2216+
22042217
endif # RUNTIME_TESTING_MENU
22052218

22062219
config MEMTEST

‎lib/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ obj-$(CONFIG_TEST_STACKINIT) += test_stackinit.o
9292
obj-$(CONFIG_TEST_BLACKHOLE_DEV) += test_blackhole_dev.o
9393
obj-$(CONFIG_TEST_MEMINIT) += test_meminit.o
9494
obj-$(CONFIG_TEST_LOCKUP) += test_lockup.o
95+
obj-$(CONFIG_TEST_HMM) += test_hmm.o
9596

9697
obj-$(CONFIG_TEST_LIVEPATCH) += livepatch/
9798

0 commit comments

Comments
 (0)