mm/zswap: delay the initializaton of zswap until the first enablement
In the initialization of zswap, about 18MB memory will be allocated for
zswap_pool in my machine. Since not all users use zswap, the memory may
be wasted. Save the memory for these users by delaying the initialization
of zswap to first enablement.
Link: https://lkml.kernel.org/r/20220825142037.3214152-3-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>