Re: [PATCH 0/7] zsmalloc: redesign object alloc API

From: Sergey Senozhatsky

Date: Tue Nov 10 2026 - 00:53:59 EST


On (26/11/05 09:39), Yosry Ahmed wrote:
> On Thu, Nov 5, 2026 at 9:37 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
> >
> > 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 :)
>
> Oh I am 100% supporting this just for my own mental wellbeing, the
> memory saving is the icing on the cake.

Thank you guys!