On 10/14/26 11:27 PM, Gregory Price (Meta) wrote: > Both hints are non-destructive, but the tests so far only check that for > private anonymous memory. Shared memory reaches reclaim through different > paths: a dirty shared file page must be written back or left resident, > shared anonymous memory is paged out through shmem, and a SHM_LOCK'd > segment is unevictable without its VMA being VM_LOCKED. > > Check that MADV_COLD and MADV_PAGEOUT preserve a dirty shared file page, > that MADV_PAGEOUT preserves a shared anonymous page, and that it leaves a > SHM_LOCK'd page resident. The SHM_LOCK test needs root to confirm through > /proc/kpageflags that the page is unevictable, and skips if it is not. > > Signed-off-by: Gregory Price (Meta) <[email protected]> > --- > tools/testing/selftests/mm/madvise.c | 138 +++++++++++++++++++++++++++ > tools/testing/selftests/mm/vm_util.h | 1 + > 2 files changed, 139 insertions(+) LGTM Reviewed-by: Sarthak Sharma <[email protected]>
- Re: [PATCH 3/8] selftests/mm: check MADV_COL... Gregory Price
- Re: [PATCH 3/8] selftests/mm: check MADV... Gregory Price
- Re: [PATCH 3/8] selftests/mm: check ... Sarthak Sharma
- [PATCH 6/8] selftests/mm: check MADV_COLD and MADV_PA... Gregory Price (Meta)
- Re: [PATCH 6/8] selftests/mm: check MADV_COLD an... Sarthak Sharma
- [PATCH 7/8] selftests/mm: check MADV_PAGEOUT file per... Gregory Price (Meta)
- Re: [PATCH 7/8] selftests/mm: check MADV_PAGEOUT... Sarthak Sharma
- Re: [PATCH 7/8] selftests/mm: check MADV_PAG... Gregory Price
- Re: [PATCH 7/8] selftests/mm: check MADV... Sarthak Sharma
- [PATCH 5/8] selftests/mm: check that MADV_COLD and MA... Gregory Price (Meta)
- Re: [PATCH 5/8] selftests/mm: check that MADV_CO... Sarthak Sharma
- [PATCH 8/8] selftests/mm: check that unauthorized MAD... Gregory Price (Meta)
- Re: [PATCH 8/8] selftests/mm: check that unautho... Gregory Price
- Re: [PATCH 8/8] selftests/mm: check that unautho... Sarthak Sharma
- [PATCH 2/8] selftests/mm: check that MADV_PAGEOUT ski... Gregory Price (Meta)
- Re: [PATCH 2/8] selftests/mm: check that MADV_PA... Sarthak Sharma
- [PATCH 4/8] selftests/mm: check that MADV_COLD and MA... Gregory Price (Meta)
- Re: [PATCH 4/8] selftests/mm: check that MADV_CO... Sarthak Sharma

