]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: vm: add KSM unmerge test
authorZhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Thu, 2 Sep 2021 22:00:42 +0000 (15:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:18 +0000 (09:58 -0700)
commitec1fc6c38f1a932f3829629e2f0b7f4d2f1bcb84
tree97203ca56b66a3a3d369ce2467616f8d28e25689
parentfe5133636ddf843fe9a60dad3a9c01742179b495
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: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/vm/ksm_tests.c
tools/testing/selftests/vm/run_vmtests.sh