linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v3 0/5] Delay the initializaton of zswap
@ 2022-08-27 10:45 Liu Shixin
  2022-08-27 10:45 ` [PATCH -next v3 1/5] frontswap: skip frontswap_ops init if zswap init failed Liu Shixin
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Liu Shixin @ 2022-08-27 10:45 UTC (permalink / raw)
  To: Seth Jennings, Dan Streetman, Vitaly Wool, Andrew Morton,
	Nathan Chancellor, Christoph Hellwig
  Cc: linux-mm, linux-kernel, Liu Shixin, Kefeng Wang

In the initialization of zswap, about 18MB memory will be allocated for       
zswap_pool. 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.                                                             
                                                                              
v2->v3: Fix frontswap_ops NULL reported by Nathan and add init for online
swap device in backend register.
v1->v2: Change init_zswap to zswap_init suggested by Andrew.

Liu Shixin (5):
  frontswap: skip frontswap_ops init if zswap init failed.
  frontswap: invoke ops->init for online swap device in
    frontswap_register_ops
  mm/zswap: replace zswap_init_{started/failed} with zswap_init_state
  mm/zswap: delay the initializaton of zswap until the first enablement
  mm/zswap: skip confusing print info

 include/linux/swapfile.h |  2 ++
 mm/frontswap.c           | 50 +++++++++++++++++++++++++-
 mm/swapfile.c            |  4 +--
 mm/zswap.c               | 77 ++++++++++++++++++++++++++++++----------
 4 files changed, 111 insertions(+), 22 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-08-29  6:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27 10:45 [PATCH -next v3 0/5] Delay the initializaton of zswap Liu Shixin
2022-08-27 10:45 ` [PATCH -next v3 1/5] frontswap: skip frontswap_ops init if zswap init failed Liu Shixin
2022-08-28 20:44   ` Vitaly Wool
2022-08-29  2:10     ` Liu Shixin
2022-08-29  6:11       ` Vitaly Wool
2022-08-27 10:45 ` [PATCH -next v3 2/5] frontswap: invoke ops->init for online swap device in frontswap_register_ops Liu Shixin
2022-08-28 20:47   ` Vitaly Wool
2022-08-29  2:12     ` Liu Shixin
2022-08-27 10:45 ` [PATCH -next v3 3/5] mm/zswap: replace zswap_init_{started/failed} with zswap_init_state Liu Shixin
2022-08-28 20:46   ` Vitaly Wool
2022-08-27 10:45 ` [PATCH -next v3 4/5] mm/zswap: delay the initializaton of zswap until the first enablement Liu Shixin
2022-08-28 20:45   ` Vitaly Wool
2022-08-27 10:46 ` [PATCH -next v3 5/5] mm/zswap: skip confusing print info Liu Shixin
2022-08-27 22:13 ` [PATCH -next v3 0/5] Delay the initializaton of zswap Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).