[LTP] [PATCH 2/2] [RFC] syscalls/mmap12: Do not fail on non-present pages

Jan Stancek jstancek@redhat.com
Fri Aug 18 12:00:54 CEST 2017



----- Original Message -----
> There are two problems with the testcase:
> 
> 1. MAP_POPULATE is best effort operation.
> 
>    To quote Michal Hocko:
> 
>    "The semantic of MAP_POPULATE is rather vague and allows for nuances
>    in future."
> 
> 2. There is no guarantee that the pages will be present even if
>    MAP_POPULATE caused read-ahead.
> 
>    To quote Michal again:
> 
>    "Ptes can be made !present, reclaimed or who knows what else in
>    future yet that won't qualify as a regression. I find such a test
>    questionable at best."

Hi,

I agree with points 1 and 2, the test relies on likely
scenario that pages were present. We are in similar
situation when it comes to readahead test.

@Michal: Can you think of alternative way to differentiate between:
"MAP_POPULATE did its best" vs. "MAP_POPULATE is broken"?

> 
> I still think that calling mmap() with MAP_POPULATE and checking that
> the mapping is OK is a valid testcase itself, so instead of passing the
> test on present pages we simply check that the mapping is zero-filled
> (since we mapped empty file). I kept the page-present check still there
> but it now produces only INFO messages, it could be removed though if
> everyone agrees that it has no real value.

Agreed, we should have at least test that uses the flag - so we can
tell it didn't have negative impact (Oops/non-zero values mapped/etc).

Regards,
Jan


More information about the ltp mailing list