Re: [PATCH -next v9 0/3] Delay the initialization of zswap

From: Chris Li
Date: Wed May 03 2023 - 20:12:16 EST


Hi Shixing,

On Tue, Apr 11, 2023 at 05:36:29PM +0800, Liu Shixin wrote:
> In the initialization of zswap, about 18MB memory will be allocated for
> zswap_pool. Since some users may not use zswap, the zswap_pool is wasted.
> Save memory by delaying the initialization of zswap until enabled.

Sorry I am late to this discussion. I notice you are already at V9.
Anyway, I am curious how much of the 18MB was came from the zswap_pool
alone and how much of it came from the other part of the initialization.

If it is the zswap_pool alone, it means that we can have a smaller patch
to get most of your 18M back.

I also notice you move a lot of __init function back to normal functions.
That would mean those functions wouldn't be able to drop after the
initialization phase. That is another reason to move less of the initialization
function.

Chris