]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm: alloc hugepages in va_high_addr_switch test
authorChunyu Hu <chuhu@redhat.com>
Mon, 8 Sep 2025 12:47:38 +0000 (20:47 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:59 +0000 (17:25 -0700)
commit3b8ff3cc98053ed6b764368a870319b337d2f0d8
tree613ce065b0aa31b87f349e069089743fa84c5f41
parenta73f2e373d172d62e4386649cd2798a70f57f7ed
selftests/mm: alloc hugepages in va_high_addr_switch test

Alloc hugepages in the test internally, so we don't fully rely on the
run_vmtests.sh.  If run_vmtests.sh does that great, free hugepages is
enough for being used to run the test, leave it as it is, otherwise setup
the hugepages in the test.

Save the original nr_hugepages value and restore it after test finish, so
leave a stable test envronment.

Link: https://lkml.kernel.org/r/20250908124740.2946005-3-chuhu@redhat.com
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/va_high_addr_switch.sh