Re: [PATCH 0/7] zsmalloc: redesign object alloc API
From: Nhat Pham
Date: Thu Nov 05 2026 - 12:46:32 EST
On Thu, Nov 5, 2026 at 10:31 AM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
>
> On Thu, Nov 05, 2026 at 01:47:30PM +0900, Sergey Senozhatsky wrote:
> > Both zram and zswap already have per-entry structures that store zsmalloc
> > handles, so allocating a separate handle_cachep object per stored page is
> > redundant. This series embeds struct zs_handle directly into zram and
> > zswap entries and drops handle_cachep, saving 8 bytes and a slab
> > alloc/free per stored object (2MB per 1GB of swapped out 4K pages).
>
> I always hated that extra layer of indirection, thanks for doing this!
+1.
The mental load saving excites me more than the memory saving :)