Re: [PATCH 0/3] mm: remove zpool

From: Johannes Weiner

Date: Tue Sep 09 2025 - 11:04:21 EST


On Fri, Sep 05, 2025 at 02:35:12PM -0700, Nhat Pham wrote:
> On Fri, Sep 5, 2025 at 12:45 PM Yosry Ahmed <yosry.ahmed@xxxxxxxxx> wrote:
> >
> > On Fri, Sep 05, 2025 at 10:52:18AM -0700, Nhat Pham wrote:
> > > On Fri, Aug 29, 2025 at 9:22 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> > > >
> > > > zpool is an indirection layer for zswap to switch between multiple
> > > > allocator backends at runtime. Since 6.15, zsmalloc is the only
> > > > allocator left in-tree, so there is no point in keeping zpool around.
> > > >
> > >
> > > Taking a step back, even if we do have needs for multiple allocators
> > > for different setups, having it runtime-selectable makes no sense.
> >
> > Honestly I think we should take it a step further and make the
> > compressor selection only at build/boot time and completely get rid of
> > supporting having multiple pools. We'd create one pool at initilization
> > and that would be it.
> >
> > I believe this will simplify things considerably, and I doubt changing
> > the compressor at runtime has a valid use case beyond experimentation.
>
> You are completely right.
>
> And, even if there's a setup where we benefit from multiple
> compressors, the current setup is definitely not it. How are we
> realistically going to use these sysfs knobs? Change to one
> compressor, then quickly change it back? How is this remotely useful?
>
> Let's remove it all. In the future, if we want to do multiple
> compression tiers, or per-cgroup compression algorithm, we will need a
> completely different architecture anyway.

+1 Completely agreed, it's not worth all this fragile code in zswap.c.

I'll send follow-up patches.