On Wed, Mar 25, 2026 at 11:27 PM Li Wang <[email protected]> wrote:
>
> test_swapin_nozswap can hit OOM before reaching its assertions on some
> setups. The test currently sets memory.max=8M and then allocates/reads
> 32M with memory.zswap.max=0, which may over-constrain reclaim and kill
> the workload process.
>
> Replace hardcoded sizes with PAGE_SIZE-based values:
>   - control_allocation_size = PAGE_SIZE * 512
>   - memory.max = control_allocation_size * 3 / 4
>   - minimum expected swap = control_allocation_size / 4
>
> This keeps the test pressure model intact (allocate/read beyond memory.max to
> force swap-in/out) while making it more robust across different environments.
>
> The test intent is unchanged: confirm that swapping occurs while zswap remains
> unused when memory.zswap.max=0.
>

Acked-by: Nhat Pham <[email protected]>

Reply via email to