Re: [PATCH v3 2/4] mm/zswap: Implement proactive writeback
From: Yosry Ahmed
Date: Thu Jun 04 2026 - 01:36:56 EST
> >> But doesn't it make more sense to specify the compressed size, which is
> >> ultimately the amount of memory you actually want to reclaim.
> >>
> >
> > I personally prefer compressed size to pre-compressed size. That's
> > kinda what user cares about, no?
> >
> > One thing we can do is let users prescribe a compressed size, but
> > internally, we can multiply that by the average compression ratio.
> > That gives us a guesstimate of how many pages we need to reclaim, and
> > you can follow the rest of your implementation as is (perhaps with
> > short-circuit when we reach the goal with fewer pages reclaimed).
>
> Got it. I will change it to use the compressed size in the next version.
>
> Yosry, Nhat, should we continue using the zswap_writeback_only key to
> trigger proactive writeback?
I *really* want the memcg maintainers to chime in here, it's
ultimately their call.
Michal? Johannes? Shakeel? Roman? Anyone? :D