lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250910134635.GB1111@cmpxchg.org>
Date: Wed, 10 Sep 2025 09:46:35 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Nhat Pham <nphamcs@...il.com>,
	Chengming Zhou <zhouchengming@...edance.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mm: remove unused zpool layer

On Tue, Sep 09, 2025 at 08:09:22PM +0000, Yosry Ahmed wrote:
> On Tue, Sep 09, 2025 at 08:08:12PM +0000, Yosry Ahmed wrote:
> > On Tue, Sep 09, 2025 at 04:16:39PM +0100, Johannes Weiner wrote:
> > > On Fri, Sep 05, 2025 at 06:58:47PM +0000, Yosry Ahmed wrote:
> > > > On Fri, Aug 29, 2025 at 05:15:27PM +0100, Johannes Weiner wrote:
> > > > > With zswap using zsmalloc directly, there are no more in-tree users of
> > > > > this code. Remove it.
> > > > > 
> > > > > Signed-off-by: Johannes Weiner <hannes@...xchg.org>
> > > > > ---
> > > > [..]
> > > > > @@ -125,45 +122,18 @@ config ZSWAP_COMPRESSOR_DEFAULT
> > > > >         default "zstd" if ZSWAP_COMPRESSOR_DEFAULT_ZSTD
> > > > >         default ""
> > > > >  
> > > > > -choice
> > > > > -	prompt "Default allocator"
> > > > > -	depends on ZSWAP
> > > > > -	default ZSWAP_ZPOOL_DEFAULT_ZSMALLOC if MMU
> > > > > -	help
> > > > > -	  Selects the default allocator for the compressed cache for
> > > > > -	  swap pages.
> > > > > -	  The default is 'zbud' for compatibility, however please do
> > > > > -	  read the description of each of the allocators below before
> > > > > -	  making a right choice.
> > > > > -
> > > > > -	  The selection made here can be overridden by using the kernel
> > > > > -	  command line 'zswap.zpool=' option.
> > > > > +config ZSMALLOC
> > > > > +	tristate
> > > > >  
> > > > > -config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
> > > > > -	bool "zsmalloc"
> > > > > -	select ZSMALLOC
> > > > > -	help
> > > > > -	  Use the zsmalloc allocator as the default allocator.
> > > > > -endchoice
> > > > > +if ZSMALLOC
> > > > >  
> > > > > -config ZSWAP_ZPOOL_DEFAULT
> > > > > -       string
> > > > > -       depends on ZSWAP
> > > > > -       default "zsmalloc" if ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
> > > > > -       default ""
> > > > > +menu "Zsmalloc allocator options"
> > > > > +	depends on ZSMALLOC
> > > > >  
> > > > > -config ZSMALLOC
> > > > > -	tristate
> > > > > -	prompt "N:1 compression allocator (zsmalloc)" if (ZSWAP || ZRAM)
> > > > > -	depends on MMU
> > > > > -	help
> > > > > -	  zsmalloc is a slab-based memory allocator designed to store
> > > > > -	  pages of various compression levels efficiently. It achieves
> > > > > -	  the highest storage density with the least amount of fragmentation.
> > > > 
> > > > Why remove the prompt and help text here?
> > > 
> > > We shouldn't ask users unnecessary questions. Zswap and zram are the
> > > user-visible kernel options; if one of them is selected, they should
> > > just quietly pull in the zsmalloc code.
> > 
> > That's fair, although ideally we should call it out in the commit log :P
> 
> With the commit log amended:
> 
> Acked-by: Yosry Ahmed <yosry.ahmed@...ux.dev> 

Thanks!

Andrew, could you add this to the changelog?

---

With zpool gone, zsmalloc is now always a simple dependency and no
longer something the user needs to configure. Hide CONFIG_ZSMALLOC
from the user and have zswap and zram pull it in as needed.

---

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ