linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] mm/zswap: dstmem reuse optimizations and cleanups
@ 2023-12-13  4:17 Chengming Zhou
  2023-12-13  4:17 ` [PATCH 1/5] mm/zswap: reuse dstmem when decompress Chengming Zhou
                   ` (4 more replies)
  0 siblings, 5 replies; 41+ messages in thread
From: Chengming Zhou @ 2023-12-13  4:17 UTC (permalink / raw)
  To: Andrew Morton, Nhat Pham, Chris Li, Johannes Weiner,
	Seth Jennings, Dan Streetman, Vitaly Wool, Yosry Ahmed
  Cc: Nhat Pham, linux-kernel, linux-mm, Chengming Zhou

Hi everyone,

This series is split from [1] to only include zswap dstmem reuse
optimizations and cleanups, the other part of rbtree breakdown will
be deferred to retest after the rbtree converted to xarray.

And the problem this series tries to optimize is that zswap_load()
and zswap_writeback_entry() have to malloc a temporary memory to
support !zpool_can_sleep_mapped(). We can avoid it by reusing the
percpu crypto_acomp_ctx->dstmem, which is also used by zswap_store()
and protected by the same percpu crypto_acomp_ctx->mutex.

[1] https://lore.kernel.org/all/20231206-zswap-lock-optimize-v1-0-e25b059f9c3a@bytedance.com/

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
Chengming Zhou (5):
      mm/zswap: reuse dstmem when decompress
      mm/zswap: change dstmem size to one page
      mm/zswap: refactor out __zswap_load()
      mm/zswap: cleanup zswap_load()
      mm/zswap: cleanup zswap_reclaim_entry()

 mm/zswap.c | 158 +++++++++++++++++++------------------------------------------
 1 file changed, 49 insertions(+), 109 deletions(-)
---
base-commit: 1f242c1964cf9b8d663a2fd72159b296205a8126
change-id: 20231213-zswap-dstmem-d828f563303d

Best regards,
-- 
Chengming Zhou <zhouchengming@bytedance.com>


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

end of thread, other threads:[~2023-12-20  4:30 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13  4:17 [PATCH 0/5] mm/zswap: dstmem reuse optimizations and cleanups Chengming Zhou
2023-12-13  4:17 ` [PATCH 1/5] mm/zswap: reuse dstmem when decompress Chengming Zhou
2023-12-13 23:24   ` Yosry Ahmed
2023-12-14 13:29     ` Chengming Zhou
2023-12-14 13:32       ` Yosry Ahmed
2023-12-14 14:42         ` Chengming Zhou
2023-12-14 18:24           ` Yosry Ahmed
2023-12-18  8:06             ` Chengming Zhou
2023-12-14 17:59   ` Chris Li
2023-12-14 18:26     ` Yosry Ahmed
2023-12-14 22:02       ` Chris Li
2023-12-14 20:33     ` Nhat Pham
2023-12-13  4:17 ` [PATCH 2/5] mm/zswap: change dstmem size to one page Chengming Zhou
2023-12-13 23:34   ` Yosry Ahmed
2023-12-14  0:18     ` Nhat Pham
2023-12-14 13:33       ` Chengming Zhou
2023-12-14 13:37         ` Yosry Ahmed
2023-12-14 13:57           ` Chengming Zhou
2023-12-14 15:03             ` Chengming Zhou
2023-12-14 18:34               ` Yosry Ahmed
2023-12-14 18:30             ` Yosry Ahmed
2023-12-14 20:29               ` Nhat Pham
2023-12-13  4:18 ` [PATCH 3/5] mm/zswap: refactor out __zswap_load() Chengming Zhou
2023-12-13 23:37   ` Yosry Ahmed
2023-12-14  0:52   ` Yosry Ahmed
2023-12-14 14:45     ` Chengming Zhou
2023-12-18  8:15     ` Chengming Zhou
2023-12-18  9:38       ` Yosry Ahmed
2023-12-13  4:18 ` [PATCH 4/5] mm/zswap: cleanup zswap_load() Chengming Zhou
2023-12-14  0:56   ` Yosry Ahmed
2023-12-13  4:18 ` [PATCH 5/5] mm/zswap: cleanup zswap_reclaim_entry() Chengming Zhou
2023-12-13 23:27   ` Nhat Pham
2023-12-14  1:02   ` Yosry Ahmed
2023-12-14 22:23     ` Andrew Morton
2023-12-14 22:41       ` Yosry Ahmed
2023-12-18 14:03         ` Johannes Weiner
2023-12-18 14:39           ` Yosry Ahmed
2023-12-18 14:58             ` Johannes Weiner
2023-12-18 20:52               ` Yosry Ahmed
2023-12-19 12:16                 ` Chengming Zhou
2023-12-20  4:30                 ` Johannes Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox