Re: [PATCH v3] mm: bypass swap readahead for zswap

From: Barry Song

Date: Mon Oct 12 2026 - 11:27:00 EST


On Mon, Oct 12, 2026 at 10:21 PM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>
> On Mon, Oct 12, 2026 at 1:01 AM Barry Song <baohua@xxxxxxxxxx> wrote:
> >
> >
> > Thanks! This seems to be a strong indication that setting
> > `page-cluster = 0` can also resolve your problem, even without your
> > patch. :-)
>
> If every tenants use zswap, yes. But we have tenants with different
> kinds of swap backend in the same host (some using compressed
> synchronous swap backend, some async IO swap backend).
>

Yep, I have no objection to this patch. As I replied to
Alexandre, I was just curious about what would happen if we
set `page-cluster` to 0.

I think Alexandre's autotuning patch looks good overall. We
just have a lot of corner cases to consider. For example, we
might miss zswap and trigger readahead, even though some
folios in the readahead window are actually in zswap. The
opposite could also happen.

However, I don't think we need to handle all this complexity
at this point.

Best Regards
Barry