Re: [PATCH v2 00/17] selftests/mm: improve khugepaged coverage

From: Kiryl Shutsemau

Date: Tue Aug 11 2026 - 13:21:52 EST


On Mon, Aug 10, 2026 at 02:58:43PM +0200, Alexander Gordeev wrote:
> On Fri, Aug 07, 2026 at 12:36:30PM +0100, Kiryl Shutsemau wrote:
>
> Hi Kiryl,
>
> ...
> > - Dropped the swap-skip patch, an equivalent has landed
> > (Alexander Gordeev).
>
> And dropped [1] following David feedback [2]. Would you pursue the proper fix?

Yes. v3 will handle the failure rather than predict it.

is_swap_enabled() already skips these cases when no swap is active, so what
is left is swap that exists but cannot take what the case asks for. The
series already has swapout_range(), which reissues MADV_PAGEOUT for up to two
seconds and reports whether the count arrived; I will make the two cases skip
when it does not. That covers swap too small, swap full, a memcg limit and a
folio still under writeback, without reading /proc/meminfo for any of them.

An error from madvise() itself stays a hard failure -- that is the kernel
refusing, not the machine being short of swap.

--
Kiryl Shutsemau / Kirill A. Shutemov