]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/mm: test that rmap behaves as expected
authorWei Yang <richard.weiyang@gmail.com>
Tue, 19 Aug 2025 08:00:47 +0000 (08:00 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:13 +0000 (16:55 -0700)
commitc9615059cab5ad8aa6b96195163a7478fcef194c
tree76450784ca1a5f1ae033b77a7d703e4747fea772
parentb27f292de6b1a39e9fb0f83c79dfe902a9ea86c3
selftests/mm: test that rmap behaves as expected

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

The general idea is if migrate one shared page between processes, this
would be reflected in all related processes.  Otherwise, we have problem
in rmap.

Currently it covers following four scenarios:

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

Link: https://lkml.kernel.org/r/20250819080047.10063-3-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>
MAINTAINERS
tools/testing/selftests/mm/.gitignore
tools/testing/selftests/mm/Makefile
tools/testing/selftests/mm/rmap.c [new file with mode: 0644]
tools/testing/selftests/mm/run_vmtests.sh