]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: vm: add KSM zero page merging 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:18 +0000 (09:34 +1000)
commit3f579f1a3f864a53af841efcfc21c4a46c741471
treecd0ef0e8f4ec2728c22f67a94142755427e47085
parenta113a89432619f1963c85d183bfec7e949ea039a
selftests: vm: add KSM zero page merging test

Add check_ksm_zero_page_merge() function to test that empty pages are
being handled properly.  For this, several zero pages are allocated and
merged using madvise.  If use_zero_pages is enabled, the pages must be
shared with the special kernel zero pages; otherwise, they are merged as
usual duplicate pages.  The test is run as follows: ./ksm_tests -Z

Link: https://lkml.kernel.org/r/6d0caab00d4bdccf5e3791cb95cf6dfd5eb85e45.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/ksm_tests.c
tools/testing/selftests/vm/run_vmtests.sh