]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: vm: add KSM unmerge 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)
commita113a89432619f1963c85d183bfec7e949ea039a
tree47077e3ae1603d6715a39db89e91780b33cd6510
parentc47e74219d4b911c492b9c676a3cedacd1d6f95b
selftests: vm: add KSM unmerge test

Add check_ksm_unmerge() function to verify that KSM is properly unmerging
shared pages.  For this, two duplicate pages are merged first and then
their contents are modified.  Since they are not identical anymore, the
pages must be unmerged and the number of merged pages has to be 0.  The
test is run as follows: ./ksm_tests -U

Link: https://lkml.kernel.org/r/c0f55420440d704d5b094275b4365aa1b2ad46b5.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