Re: [PATCH v3 09/11] zsmalloc: embed struct zs_handle into zram and zswap entries

From: Xueyuan Chen

Date: Tue Nov 17 2026 - 05:59:32 EST


On Wed, 11 Nov 2026 15:46:32 +0900, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> wrote:
> zsmalloc allocates an object from handle_cachep for every stored
> object, just to have a stable address which compaction and page
> migration can update when the object moves. Both zram and zswap
> already have per-entry structures that hold the handle, so we basically
> keep a pointer to a pointer, which costs 8 bytes per stored object,
> slab alloc/free on every store and free, and one more memory load on
> every access.
>
> [...]

Reviewed-by: Xueyuan Chen <xueyuan.chen21@xxxxxxxxx>

--
Best regards,
Xueyuan