Re: [PATCH 1/2] mm: zswap: free synchronous-IO writeback folios directly
From: Nhat Pham
Date: Thu Jul 23 2026 - 11:53:39 EST
On Thu, Jul 23, 2026 at 8:38 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>
> >
> > I just chatted with Alexandre off-list, but this path does not store
> > an eviction shadow like the reclaim path does. That means no refaults
> > are detected from dropbehind pages, which can fundamentally alter
> > reclaim decisions, zswap shrinker force, and pressure detection.
>
> I think it's a zswap shrinker bug even before this patch. When we
> allocate a new buffer for the writeback request and add to swap cache,
> we erase the old shadow :(
... and count it as a refault :| Which is even worse than just silent
erasure. It throws off all our workingset tracking heuristics,
inaccurately reporting refault on a really cold page (writeback
candidate).