]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm: change MAP_CHUNK_SIZE
authorChaitanya S Prakash <chaitanyas.prakash@arm.com>
Thu, 23 Mar 2023 06:01:19 +0000 (11:31 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:40 +0000 (16:02 -0700)
commit9a408b90bd87b4e03b14b3d54bd2c8c6092fbe14
tree0bd357ffc50ac699edf64d1ad61fd5c928aad4b4
parentf638fed2806750f0d2a939b0e860abc9e432483e
selftests/mm: change MAP_CHUNK_SIZE

Patch series "selftests: Fix virtual address range for arm64", v2.

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 patch (of 3):

mmap() fails to allocate 16GB virtual space chunk, skipping both low and
high VA range iterations.  Hence, reduce MAP_CHUNK_SIZE to 1GB and update
relevant macros as required.

Link: https://lkml.kernel.org/r/20230323060121.1175830-1-chaitanyas.prakash@arm.com
Link: https://lkml.kernel.org/r/20230323060121.1175830-2-chaitanyas.prakash@arm.com
Signed-off-by: Chaitanya S Prakash <chaitanyas.prakash@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/virtual_address_range.c