]> git.ipfire.org Git - thirdparty/linux.git/commit - mm/zswap.c
mm/zswap: remove zswap_entry_cache_{create,destroy} helper function
authorLiu Shixin <liushixin2@huawei.com>
Mon, 3 Apr 2023 12:13:16 +0000 (20:13 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:29:48 +0000 (16:29 -0700)
commitb791912252716168697a258bd8bbf579296ba438
treedea3bc7ac1d1d89c85d750121b9d2a4068bf3339
parentfa1c77c13ca59101c4fbf0ff8bbadd3aaba375f8
mm/zswap: remove zswap_entry_cache_{create,destroy} helper function

Patch series "Delay the initialization of zswap", v9.

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.

This patch (of 3):

Remove zswap_entry_cache_create and zswap_entry_cache_destroy and use
kmem_cache_* function directly.

Link: https://lkml.kernel.org/r/20230411093632.822290-1-liushixin2@huawei.com
Link: https://lkml.kernel.org/r/20230403121318.1876082-1-liushixin2@huawei.com
Link: https://lkml.kernel.org/r/20230403121318.1876082-2-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Nathan Chancellor <nathan@kernel.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