linux/tools/testing/selftests/vm
Zi Yan fa6c02315f mm: huge_memory: a new debugfs interface for splitting THP tests
We did not have a direct user interface of splitting the compound page
backing a THP and there is no need unless we want to expose the THP
implementation details to users.  Make <debugfs>/split_huge_pages accept a
new command to do that.

By writing "<pid>,<vaddr_start>,<vaddr_end>" to
<debugfs>/split_huge_pages, THPs within the given virtual address range
from the process with the given pid are split. It is used to test
split_huge_page function. In addition, a selftest program is added to
tools/testing/selftests/vm to utilize the interface by splitting
PMD THPs and PTE-mapped THPs.

This does not change the old behavior, i.e., writing 1 to the interface
to split all THPs in the system.

Link: https://lkml.kernel.org/r/20210331235309.332292-1-zi.yan@sent.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mika Penttila <mika.penttila@nextfour.com>
Cc: Sandipan Das <sandipan@linux.ibm.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>
2021-05-05 11:27:21 -07:00
..
.gitignore mm: huge_memory: a new debugfs interface for splitting THP tests 2021-05-05 11:27:21 -07:00
charge_reserved_hugetlb.sh hugetlb_cgroup: add hugetlb_cgroup reservation tests 2020-04-02 09:35:32 -07:00
check_config.sh selftests/vm: hmm-tests: remove the libhugetlbfs dependency 2020-12-15 12:13:38 -08:00
compaction_test.c selftests/vm: 8x compaction_test speedup 2020-10-13 18:38:34 -07:00
config mm/gup_benchmark: rename to mm/gup_test 2020-12-15 12:13:38 -08:00
gup_test.c selftests/vm: gup_test: introduce the dump_pages() sub-test 2020-12-15 12:13:38 -08:00
hmm-tests.c selftests/vm: hmm-tests: remove the libhugetlbfs dependency 2020-12-15 12:13:38 -08:00
hugepage-mmap.c
hugepage-shm.c
hugetlb_reparenting_test.sh hugetlb_cgroup: add hugetlb_cgroup reservation tests 2020-04-02 09:35:32 -07:00
khugepaged.c khugepaged: selftests: fix timeout condition in wait_for_scan() 2020-06-10 19:14:17 -07:00
Makefile mm: huge_memory: a new debugfs interface for splitting THP tests 2021-05-05 11:27:21 -07:00
map_fixed_noreplace.c
map_hugetlb.c selftests/vm: fix display of page size in map_hugetlb 2020-09-19 13:13:39 -07:00
map_populate.c
mlock-random-test.c
mlock2-tests.c selftests: vm: drop dependencies on page flags from mlock2 tests 2020-04-02 09:35:31 -07:00
mlock2.h
mremap_dontunmap.c selftests: add a MREMAP_DONTUNMAP selftest for shmem 2021-04-30 11:20:39 -07:00
mremap_test.c kselftests: vm: add mremap tests 2020-12-15 12:13:40 -08:00
on-fault-limit.c
pkey-helpers.h selftests/vm/pkeys: introduce a sub-page allocator 2020-06-04 19:06:27 -07:00
pkey-powerpc.h selftests: vm: pkeys: use the correct page size on powerpc 2020-06-04 19:06:27 -07:00
pkey-x86.h selftests/vm/pkeys: introduce a sub-page allocator 2020-06-04 19:06:27 -07:00
protection_keys.c selftests/vm/keys: fix a broken reference at protection_keys.c 2020-06-26 10:01:12 -06:00
run_vmtests.sh selftests/vm: rename file run_vmtests to run_vmtests.sh 2021-02-09 17:26:44 -08:00
split_huge_page_test.c mm: huge_memory: a new debugfs interface for splitting THP tests 2021-05-05 11:27:21 -07:00
test_hmm.sh mm/hmm/test: add selftests for HMM 2020-05-19 16:48:31 -03:00
test_vmalloc.sh vm/test_vmalloc.sh: adapt for updated driver interface 2021-04-30 11:20:40 -07:00
thuge-gen.c
transhuge-stress.c
userfaultfd.c linux-kselftest-next-5.11-rc1 2020-12-16 00:17:58 -08:00
va_128TBswitch.c
virtual_address_range.c
write_hugetlb_memory.sh hugetlb_cgroup: add hugetlb_cgroup reservation tests 2020-04-02 09:35:32 -07:00
write_to_hugetlbfs.c selftests/vm/write_to_hugetlbfs.c: fix unused variable warning 2020-05-23 10:26:31 -07:00