]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/zswap: delay the initializaton of zswap until the first enablement
authorLiu Shixin <liushixin2@huawei.com>
Thu, 25 Aug 2022 14:20:36 +0000 (22:20 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:31 +0000 (22:03 -0700)
commit22100432cf142c63f9553ea51f31beb41b4e4d3d
treed6f52b42cc645cf60c10e21acec98143cd9d2479
parentcc5d16aeece90c873680b05c1a80a53df082a06e
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>
mm/zswap.c