Re: [PATCH v4 5/5] zsmalloc: Implement writeback mechanism for zsmalloc

From: Johannes Weiner
Date: Fri Nov 18 2022 - 00:23:56 EST


On Thu, Nov 17, 2022 at 02:48:28PM -0800, Minchan Kim wrote:
> On Thu, Nov 17, 2022 at 08:38:39AM -0800, Nhat Pham wrote:
> > @@ -449,6 +450,27 @@ static void zs_zpool_free(void *pool, unsigned long handle)
> > zs_free(pool, handle);
> > }
> >
> > +static int zs_reclaim_page(struct zs_pool *pool, unsigned int retries);
> > +
> > +static int zs_zpool_shrink(void *pool, unsigned int pages,
>
> what pages?

Hm? This is the number of driver pages to clear out. The name matches
the function signature for this callback in struct zpool_driver:

int (*shrink)(void *pool, unsigned int pages,
unsigned int *reclaimed);

I agree with the rest of the feedback.

Thanks for taking a look, Minchan!