Re: [PATCH 1/2] zswap: implement a second chance algorithm for dynamic zswap shrinker

From: Nhat Pham
Date: Tue Jul 30 2024 - 17:41:02 EST


On Tue, Jul 30, 2024 at 11:46 AM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote:
>
>
> I still think the nr_deferred handling in the shrinker framework does
> not seem compatible with zswap. Entries could be double counted, and
> previously counted entries could go away during swapins. Unless I am
> missing something, it seems like the scanning can be arbitrary, and
> not truly proportional to the reclaim priority and zswap LRUs size.

We can do some investigation by the side. I did find the trace point
that collects deferred numbers, maybe that can illustrate the problem?

It'd be an orthogonal issue though. I don't think fixing the
nr_deferred part would be enough to handle the various cases Johannes
pointed out.