]> Gentwo Git Trees - linux/.git/commit
selftests/mm: alloc hugepages in va_high_addr_switch test
authorChunyu Hu <chuhu@redhat.com>
Fri, 12 Sep 2025 01:37:10 +0000 (09:37 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:28 +0000 (14:22 -0700)
commitd9d957bd7b61175db0723b6238d8f5a9740868a4
tree3b91acdf75ac507b02d95106aa69d322cd55adf6
parent6e296bcf294ee9e8e024158ed1d279cf823eae63
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/20250912013711.3002969-3-chuhu@redhat.com
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/va_high_addr_switch.sh