aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/vm/Makefile
diff options
context:
space:
mode:
authorZhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>2021-09-02 15:00:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-03 09:58:18 -0700
commit82e717ad35018ce59ba1b66297dfd898b2a1a03f (patch)
tree2f7fd7465f2fc04dba57ba958ce87320a19c4758 /tools/testing/selftests/vm/Makefile
parentselftests: vm: add KSM zero page merging test (diff)
downloadlinux-dev-82e717ad35018ce59ba1b66297dfd898b2a1a03f.tar.xz
linux-dev-82e717ad35018ce59ba1b66297dfd898b2a1a03f.zip
selftests: vm: add KSM merging across nodes test
Add check_ksm_numa_merge() function to test that pages in different NUMA nodes are being handled properly. First, two duplicate pages are allocated in two separate NUMA nodes using the libnuma library. Since there is one unique page in each node, with merge_across_nodes = 0, there won't be any shared pages. If merge_across_nodes is set to 1, the pages will be treated as usual duplicate pages and will be merged. If NUMA config is not enabled or the number of NUMA nodes is less than two, then the test is skipped. The test is run as follows: ./ksm_tests -N Link: https://lkml.kernel.org/r/071c17b5b04ebb0dfeba137acc495e5dd9d2a719.1626252248.git.zhansayabagdaulet@gmail.com Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com> Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com> Cc: Hugh Dickins <hughd@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/vm/Makefile')
-rw-r--r--tools/testing/selftests/vm/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index e6f22a801b71..d9605bd10f2d 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -146,6 +146,8 @@ $(OUTPUT)/hmm-tests: local_config.h
# HMM_EXTRA_LIBS may get set in local_config.mk, or it may be left empty.
$(OUTPUT)/hmm-tests: LDLIBS += $(HMM_EXTRA_LIBS)
+$(OUTPUT)/ksm_tests: LDLIBS += -lnuma
+
local_config.mk local_config.h: check_config.sh
/bin/sh ./check_config.sh $(CC)