]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/mm: put general ksm operation into vm_util
authorWei Yang <richard.weiyang@gmail.com>
Tue, 19 Aug 2025 08:00:46 +0000 (08:00 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:13 +0000 (16:55 -0700)
commitb27f292de6b1a39e9fb0f83c79dfe902a9ea86c3
tree43354213ec489c240b0f13b585509014aa82213c
parent63ec0c26b682ca235953490dfa82b8fa4d4ab4a0
selftests/mm: put general ksm operation into vm_util

Patch series "test that rmap behaves as expected", v4.

As David suggested, currently we don't have a high level test case to
verify the behavior of rmap. This patch set introduce the verification
on rmap by migration.

Patch 1 is a preparation to move ksm related operations into vm_util.
Patch 2 is the new test case for rmap.

Currently it covers following four scenarios:

  * anonymous page
  * shmem page
  * pagecache page
  * ksm page

This patch (of 2):

There are some general ksm operations could be used by other related
test cases. Put them into vm_util for common use.

This is a preparation patch for later use.

Link: https://lkml.kernel.org/r/20250819080047.10063-1-richard.weiyang@gmail.com
Link: https://lkml.kernel.org/r/20250819080047.10063-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/ksm_functional_tests.c
tools/testing/selftests/mm/vm_util.c
tools/testing/selftests/mm/vm_util.h