[PATCH v3 0/2] zram: zsmalloc: speed up zspage free path
From: Sergey Senozhatsky
Date: Mon Nov 23 2026 - 00:48:01 EST
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@xxxxxxxxxx/
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