linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] Implement writeback for zsmalloc
@ 2022-11-19  0:15 Nhat Pham
  2022-11-19  0:15 ` [PATCH v6 1/6] zswap: fix writeback lock ordering " Nhat Pham
                   ` (6 more replies)
  0 siblings, 7 replies; 39+ messages in thread
From: Nhat Pham @ 2022-11-19  0:15 UTC (permalink / raw)
  To: akpm
  Cc: hannes, linux-mm, linux-kernel, minchan, ngupta, senozhatsky,
	sjenning, ddstreet, vitaly.wool

Changelog:
v6:
  * Move the move-to-front logic into zs_map_object (patch 4)
    (suggested by Minchan Kim).
  * Small clean up for free_zspage at free_handles() call site
    (patch 6) (suggested by Minchan Kim).
v5:
  * Add a new patch that eliminates unused code in zpool and simplify
    the logic for storing evict handler in zbud/z3fold (patch 2)
  * Remove redudant fields in zs_pool (previously required by zpool)
    (patch 3)
  * Wrap under_reclaim and deferred handle freeing logic in CONFIG_ZPOOL
    (patch 6) (suggested by Minchan Kim)
  * Move a small piece of refactoring from patch 6 to patch 4.
v4:
  * Wrap the new LRU logic in CONFIG_ZPOOL (patch 3).
    (suggested by Minchan Kim)
v3:
  * Set pool->ops = NULL when pool->zpool_ops is null (patch 4).
  * Stop holding pool's lock when calling lock_zspage() (patch 5).
    (suggested by Sergey Senozhatsky)
  * Stop holding pool's lock when checking pool->ops and retries.
    (patch 5) (suggested by Sergey Senozhatsky)
  * Fix formatting issues (.shrink, extra spaces in casting removed).
    (patch 5) (suggested by Sergey Senozhatsky)
v2:
  * Add missing CONFIG_ZPOOL ifdefs (patch 5)
    (detected by kernel test robot).

Unlike other zswap's allocators such as zbud or z3fold, zsmalloc
currently lacks the writeback mechanism. This means that when the zswap
pool is full, it will simply reject further allocations, and the pages
will be written directly to swap.

This series of patches implements writeback for zsmalloc. When the zswap
pool becomes full, zsmalloc will attempt to evict all the compressed
objects in the least-recently used zspages.

There are 6 patches in this series:

Johannes Weiner (2):
  zswap: fix writeback lock ordering for zsmalloc
  zpool: clean out dead code

Nhat Pham (4):
  zsmalloc: Consolidate zs_pool's migrate_lock and size_class's locks
  zsmalloc: Add a LRU to zs_pool to keep track of zspages in LRU order
  zsmalloc: Add zpool_ops field to zs_pool to store evict handlers
  zsmalloc: Implement writeback mechanism for zsmalloc

 mm/z3fold.c   |  36 +-----
 mm/zbud.c     |  32 +----
 mm/zpool.c    |  10 +-
 mm/zsmalloc.c | 325 ++++++++++++++++++++++++++++++++++++++++----------
 mm/zswap.c    |  37 +++---
 5 files changed, 295 insertions(+), 145 deletions(-)

--
2.30.2

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

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

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-19  0:15 [PATCH v6 0/6] Implement writeback for zsmalloc Nhat Pham
2022-11-19  0:15 ` [PATCH v6 1/6] zswap: fix writeback lock ordering " Nhat Pham
2022-11-22  1:43   ` Sergey Senozhatsky
2022-11-19  0:15 ` [PATCH v6 2/6] zpool: clean out dead code Nhat Pham
2022-11-22  1:46   ` Sergey Senozhatsky
2022-11-19  0:15 ` [PATCH v6 3/6] zsmalloc: Consolidate zs_pool's migrate_lock and size_class's locks Nhat Pham
2022-11-19  0:15 ` [PATCH v6 4/6] zsmalloc: Add a LRU to zs_pool to keep track of zspages in LRU order Nhat Pham
2022-11-19 16:38   ` Johannes Weiner
2022-11-19 17:34   ` Minchan Kim
2022-11-22  1:52   ` Sergey Senozhatsky
2022-11-22 17:42     ` Johannes Weiner
2022-11-23  3:50       ` Sergey Senozhatsky
2022-11-23  8:02         ` Yosry Ahmed
2022-11-23  8:11           ` Yosry Ahmed
2022-11-23 16:30             ` Johannes Weiner
2022-11-24  3:29               ` Sergey Senozhatsky
2022-11-24  3:21           ` Sergey Senozhatsky
2022-11-23  3:58   ` Sergey Senozhatsky
2022-11-19  0:15 ` [PATCH v6 5/6] zsmalloc: Add zpool_ops field to zs_pool to store evict handlers Nhat Pham
2022-11-19 16:39   ` Johannes Weiner
2022-11-22  1:11     ` Sergey Senozhatsky
2022-11-19  0:15 ` [PATCH v6 6/6] zsmalloc: Implement writeback mechanism for zsmalloc Nhat Pham
2022-11-19 16:45   ` Johannes Weiner
2022-11-19 17:35   ` Minchan Kim
2022-11-22  1:40   ` Sergey Senozhatsky
2022-11-22  2:00   ` Sergey Senozhatsky
2022-11-22  2:15   ` Sergey Senozhatsky
2022-11-22  3:12     ` Johannes Weiner
2022-11-22  3:42       ` Sergey Senozhatsky
2022-11-22  6:09         ` Johannes Weiner
2022-11-22  6:35           ` Sergey Senozhatsky
2022-11-22  7:10             ` Johannes Weiner
2022-11-22  7:19               ` Sergey Senozhatsky
2022-11-22  6:37   ` Sergey Senozhatsky
2022-11-23 16:30     ` Nhat Pham
2022-11-23 17:27       ` Johannes Weiner
2022-11-23 17:18     ` Johannes Weiner
2022-11-21 19:29 ` [PATCH v6 0/6] Implement writeback " Nhat Pham
2022-11-23 19:26   ` Nhat Pham

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).