Re: [RFC PATCH v2 2/7] mm: zswap: remove page reclaim logic from zbud

Johannes Weiner
2023-06-08T16:03:23Z

Hi Domenico,

On Tue, Jun 06, 2023 at 04:56:06PM +0200, Domenico Cerasuolo wrote:
> With the recent enhancement to zswap enabling direct page writeback, the
> need for the shrink code in zbud has become obsolete. As a result, this
> commit removes the page reclaim logic from zbud entirely.
>
> Signed-off-by: Domenico Cerasuolo <cerasuolodomenico@gmail.com>

I find the changelog a bit difficult to understand. How about:

Switch zbud to the new generic zswap LRU and remove its custom
implementation.

> @@ -585,7 +425,7 @@ static struct zpool_driver zbud_zpool_driver = {
> .destroy = zbud_zpool_destroy,
> .malloc = zbud_zpool_malloc,
> .free = zbud_zpool_free,
> - .shrink = zbud_zpool_shrink,
> + .shrink = NULL,
> .map = zbud_zpool_map,
> .unmap = zbud_zpool_unmap,
> .total_size = zbud_zpool_total_size,

Like Minchan pointed out in the zsmalloc patch, you can just remove
the line as the member is NULL by default.

With that, please add:

Acked-by: Johannes Weiner <hannes@cmpxchg.org>