]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: vm: add KSM merging across nodes test
authorZhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Mon, 23 Aug 2021 23:59:38 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:34:19 +0000 (09:34 +1000)
commit4081d843008614f068f76810a79fb94504ef0f3d
tree0c2127eef1a113e080f56b559ff1a9fbab7356a7
parent3f579f1a3f864a53af841efcfc21c4a46c741471
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: Stephen Rothwell <sfr@canb.auug.org.au>
tools/testing/selftests/vm/Makefile
tools/testing/selftests/vm/ksm_tests.c
tools/testing/selftests/vm/run_vmtests.sh