Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] zram: zsmalloc: speed up zspage free path
@ 2026-11-23  5:47 Sergey Senozhatsky
  2026-11-23  5:47 ` [PATCH v3 1/2] zsmalloc: free a zspage's pages in one batch Sergey Senozhatsky
  2026-11-23  5:47 ` [PATCH v3 2/2] zram: keep the hot statistics per CPU Sergey Senozhatsky
  0 siblings, 2 replies; 11+ messages in thread
From: Sergey Senozhatsky @ 2026-11-23  5:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nhat Pham, Yosry Ahmed, Hongfeng Chen, Brian Geffon, Minchan Kim,
	linux-kernel, linux-block, linux-mm, Sergey Senozhatsky

This is a followup on deferred zs_free() discussion [1].  We cannot
do deferred zs_free(), at least not on the zsmalloc side, due to the
fact that object handle is now stored in-place on the client side
(zswap/zram entry).  There is still a possibility for a speed up
tho.  One is batching of zspage's pages free.  The other one is
moving zram stats into per-CPU area (as was suggested by Hongfeng
Chen), which reduces cache lines bouncing in zram slot-free
notification path.

[1] https://lore.kernel.org/all/20261016120927.3191690-1-hongfengchen@xiaomi.com/

v2 -> v3:
- clamp negative stats to 0 (Sashiko).

Sergey Senozhatsky (2):
  zsmalloc: free a zspage's pages in one batch
  zram: keep the hot statistics per CPU

 drivers/block/zram/zram_drv.c | 99 ++++++++++++++++++++++++++---------
 drivers/block/zram/zram_drv.h | 26 ++++++---
 mm/zsmalloc.c                 | 52 +++++++++++++++---
 3 files changed, 139 insertions(+), 38 deletions(-)

-- 
2.56.1.750.gf70dc682cf-goog



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

end of thread, other threads:[~2026-12-06  5:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  5:47 [PATCH v3 0/2] zram: zsmalloc: speed up zspage free path Sergey Senozhatsky
2026-11-23  5:47 ` [PATCH v3 1/2] zsmalloc: free a zspage's pages in one batch Sergey Senozhatsky
2026-11-23  5:47 ` [PATCH v3 2/2] zram: keep the hot statistics per CPU Sergey Senozhatsky
2026-12-04  3:56   ` Hongfeng Chen
2026-12-04  4:15     ` Barry Song
2026-12-06  3:44       ` Sergey Senozhatsky
2026-12-06  3:55     ` Sergey Senozhatsky
2026-12-06  4:58       ` Barry Song
2026-12-06  5:27         ` Sergey Senozhatsky
2026-12-06  5:29         ` Hongfeng Chen
2026-12-06  5:34           ` Sergey Senozhatsky

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