Re: [PATCH v3 2/7] selftests/mm: check MADV_COLD and MADV_PAGEOUT range handling
From: Sarthak Sharma
Date: Wed Oct 28 2026 - 07:25:48 EST
On 10/19/26 10:42 PM, Gregory Price (Meta) wrote:
> madvise(2) accepts a zero-length range, rejects an unaligned start, and
> reports an unmapped gap in the range with ENOMEM while still applying the
> advice to the mapped pages on either side.
>
> Check each of these for both hints. Around the gap, only MADV_PAGEOUT has
> an effect the test can observe, so only MADV_PAGEOUT is checked for
> paging out both neighbors, and only if MADV_PAGEOUT can swap at all.
> Both hints' ENOMEM is checked first, so it is covered without swap.
>
> Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
Looks good to me.
Reviewed-by: Sarthak Sharma <sarthak.sharma@xxxxxxx>