On 4/1/26 3:53 PM, Dave Jiang wrote:
>
>
> On 3/31/26 9:49 PM, Alison Schofield wrote:
>> The mmap test allocates a 1 GiB file and exercises a matrix of mmap
>> flag combinations across ext4+dax and xfs+dax, performing multiple
>> full-range read and write passes for each case.
>>
>> The coverage of this test comes from the mmap modes and access
>> patterns it exercises (MAP_SHARED vs MAP_PRIVATE, MAP_POPULATE,
>> mlock/munlock, and read-only mappings), not from the size of the
>> mapping itself. These behaviors are not size-dependent, and no test
>> assertions rely on a 1 GiB mapping.
>>
>> Long CI runtimes prompted a closer look at this test, but the
>> reduction stands on its own merits: a 256 MiB mapping still spans many
>> PMD (2 MiB) DAX mappings and exercises the same access patterns, while
>> avoiding unnecessary work in each test case.
>
> No excercise of tests against 1GB page?
>
> DJ
Looking a bit more, fallocate() does not care about underneath page size. So
this is probably ok.
Reviewed-by: Dave Jiang <[email protected]>
>
>
>>
>> Signed-off-by: Alison Schofield <[email protected]>
>> ---
>> test/mmap.sh | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/test/mmap.sh b/test/mmap.sh
>> index 7d0053da0e1a..c517d5b0f50b 100755
>> --- a/test/mmap.sh
>> +++ b/test/mmap.sh
>> @@ -59,12 +59,12 @@ rc=1
>>
>> mkfs.ext4 $DEV
>> mount $DEV $MNT -o dax
>> -fallocate -l 1GiB $MNT/$FILE
>> +fallocate -l 256MiB $MNT/$FILE
>> test_mmap
>> umount $MNT
>>
>> mkfs.xfs -f $DEV -m reflink=0
>> mount $DEV $MNT -o dax
>> -fallocate -l 1GiB $MNT/$FILE
>> +fallocate -l 256MiB $MNT/$FILE
>> test_mmap
>> umount $MNT
>
>