When the virtual address range selftest is run on arm64 and x86 platforms, it is observed that both the low and high VA range iterations are skipped when the MAP_CHUNK_SIZE is set to 16GB. The MAP_CHUNK_SIZE is changed to 1GB to resolve this issue, following which support for arm64 platform is added by changing the NR_CHUNKS_HIGH for aarch64 to accommodate up to 4PB of virtual address space allocation requests. Dynamic memory allocation of array holding addresses is introduced to prevent overflow of the stack. Finally, the overcommit_policy is set as OVERCOMMIT_ALWAYS to prevent the kernel from denying a memory allocation request based on a platform's physical memory availability. This series has been tested on 6.3.0-rc1 mainline kernel, both on arm64 and x86 platforms. Changes in V2: - Changed subject line to start with "selftest/mm", to maintain specificity. Changes in V1: https://lore.kernel.org/all/20230314042351.13134-1-chaitanyas.prakash@xxxxxxx/ Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Cc: linux-mm@xxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Chaitanya S Prakash (3): selftests/mm: Change MAP_CHUNK_SIZE selftests/mm: Change NR_CHUNKS_HIGH for aarch64 selftests/mm: Set overcommit_policy as OVERCOMMIT_ALWAYS tools/testing/selftests/mm/run_vmtests.sh | 8 +++++++ .../selftests/mm/virtual_address_range.c | 24 +++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) -- 2.30.2