mirror-linux/tools/testing/selftests/mm
Donet Tom 08ff89b565 selftests/mm: add fork inheritance test for ksm_merging_pages counter
Add a new selftest to verify whether the `ksm_merging_pages` counter in
`mm_struct` is not inherited by a child process after fork.  This helps
ensure correctness of KSM accounting across process creation.

Link: https://lkml.kernel.org/r/e7bb17d374133bd31a3e423aa9e46e1122e74971.1758648700.git.donettom@linux.ibm.com
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Aboorva Devarajan <aboorvad@linux.ibm.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-09-28 11:51:32 -07:00
..
page_frag
.gitignore selftests/mm: test that rmap behaves as expected 2025-09-13 16:55:13 -07:00
Makefile selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
charge_reserved_hugetlb.sh
check_config.sh
compaction_test.c
config selftests/mm: add configs to fix testcase failure 2025-06-19 20:48:02 -07:00
cow.c selftest/mm: extract sz2ord function into vm_util.h 2025-09-13 16:55:06 -07:00
droppable.c
guard-regions.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
gup_longterm.c selftest/mm: skip if fallocate() is unsupported in gup_longterm 2025-07-09 22:42:11 -07:00
gup_test.c selftests/mm: gup_tests: option to GUP all pages in a single call 2025-09-21 14:22:33 -07:00
hmm-tests.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
hugepage-mmap.c
hugepage-mremap.c selftests/mm: skip hugepage-mremap test if userfaultfd unavailable 2025-09-13 16:55:04 -07:00
hugepage-shm.c
hugepage-vmemmap.c
hugetlb-madvise.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
hugetlb-read-hwpoison.c
hugetlb-soft-offline.c
hugetlb_dio.c
hugetlb_fault_after_madv.c
hugetlb_madv_vs_map.c
hugetlb_reparenting_test.sh selftests/mm: restore default nr_hugepages value during cleanup in hugetlb_reparenting_test.sh 2025-05-11 17:48:29 -07:00
khugepaged.c selftests/mm: remove PROT_EXEC req from file-collapse tests 2025-09-21 14:22:31 -07:00
ksm_functional_tests.c selftests/mm: add fork inheritance test for ksm_merging_pages counter 2025-09-28 11:51:32 -07:00
ksm_tests.c ksm_tests: skip hugepage test when Transparent Hugepages are disabled 2025-07-09 22:42:23 -07:00
madv_populate.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
map_fixed_noreplace.c selftests/mm: deduplicate second mmap() of 5*PAGE_SIZE at base 2025-05-22 14:55:37 -07:00
map_hugetlb.c
map_populate.c
mdwe_test.c
memfd_secret.c
merge.c tools/testing/selftests: add mremap() unfaulted/faulted test cases 2025-07-13 16:38:25 -07:00
migration.c selftests/mm: fix FORCE_READ to read input value correctly 2025-08-27 22:45:42 -07:00
mkdirty.c
mlock-random-test.c
mlock2-tests.c selftests/mm: deduplicate test logging in test_mlock_lock() 2025-05-31 22:46:08 -07:00
mlock2.h
mrelease_test.c
mremap_dontunmap.c
mremap_test.c selftests/mm: fix spelling mistake "mrmeap" -> "mremap" 2025-09-13 16:54:59 -07:00
mseal_helpers.h
mseal_test.c
on-fault-limit.c
pagemap_ioctl.c selftests/mm: use calloc instead of malloc in pagemap_ioctl.c 2025-09-13 16:55:17 -07:00
pfnmap.c selftests/mm: pass filename as input param to VM_PFNMAP tests 2025-09-13 16:54:43 -07:00
pkey-arm64.h
pkey-helpers.h selftests: centralise maybe-unused definition in kselftest.h 2025-09-13 16:55:16 -07:00
pkey-powerpc.h
pkey-x86.h
pkey_sighandler_tests.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
pkey_util.c
prctl_thp_disable.c selftests: prctl: introduce tests for disabling THPs except for madvise 2025-09-13 16:55:06 -07:00
process_madv.c selftests/mm: add process_madvise() tests 2025-08-02 12:06:08 -07:00
protection_keys.c selftests/mm: protection_keys: fix dead code 2025-09-21 14:22:34 -07:00
rmap.c selftests/mm: test that rmap behaves as expected 2025-09-13 16:55:13 -07:00
run_vmtests.sh selftests/mm: gup_tests: option to GUP all pages in a single call 2025-09-21 14:22:33 -07:00
settings selftests/mm: increase timeout from 180 to 900 seconds 2025-06-19 20:48:01 -07:00
soft-dirty.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
split_huge_page_test.c selftests/mm: add -Wunreachable-code and fix warnings 2025-09-21 14:22:34 -07:00
test_hmm.sh
test_page_frag.sh
test_vmalloc.sh kselftest: mm: fix typos in test_vmalloc.sh 2025-09-13 16:55:16 -07:00
thp_settings.c selftests: prctl: introduce tests for disabling THPs completely 2025-09-13 16:55:06 -07:00
thp_settings.h selftests: prctl: introduce tests for disabling THPs completely 2025-09-13 16:55:06 -07:00
thuge-gen.c selftests/mm: skip thuge-gen test if system is not setup properly 2025-09-13 16:55:04 -07:00
transhuge-stress.c
uffd-common.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-common.h selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-stress.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-unit-tests.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
uffd-wp-mremap.c selftests/mm/uffd: refactor non-composite global vars into struct 2025-09-21 14:21:59 -07:00
va_high_addr_switch.c selftests/mm: fix va_high_addr_switch.sh failure on x86_64 2025-09-21 14:22:29 -07:00
va_high_addr_switch.sh selftests/mm: alloc hugepages in va_high_addr_switch test 2025-09-21 14:22:28 -07:00
virtual_address_range.c selftests/mm: add support to test 4PB VA on PPC64 2025-09-13 16:55:03 -07:00
vm_util.c selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
vm_util.h selftests/mm: skip soft-dirty tests when CONFIG_MEM_SOFT_DIRTY is disabled 2025-09-23 14:14:16 -07:00
write_hugetlb_memory.sh
write_to_hugetlbfs.c