Re: [PATCH v3] mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT

From: Xueyuan Chen

Date: Fri Nov 13 2026 - 02:01:55 EST


On 2026-11-12 13:29 +0100, Alexander Gordeev wrote:
> On Wed, Nov 11, 2026 at 08:41:26PM +0800, Xueyuan Chen wrote:
> > CONFIG_ZSMALLOC_STAT only controls the debugfs interface. The class
> > counters are updated regardless of this option.
> >
> > Remove the CONFIG_ZSMALLOC_STAT guards and rely on the debugfs API
> > stubs when CONFIG_DEBUG_FS=n. Skip statistics setup silently when
> > debugfs is unavailable.
> >
> > Remove the Kconfig entry and replace the existing CONFIG_ZSMALLOC_STAT
> > settings with CONFIG_DEBUG_FS=y. Update the English and Chinese
> > documentation to match, and clarify the pool name in the debugfs path.
> >
> > Suggested-by: Nhat Pham <nphamcs@xxxxxxxxx>
> > Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>
> > Signed-off-by: Xueyuan Chen <xueyuan.chen21@xxxxxxxxx>
> ...
> > arch/s390/configs/debug_defconfig | 2 +-
> > arch/s390/configs/defconfig | 2 +-
> ...
> > diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_defconfig
> > index d44674b63715..83193ef8efb9 100644
> > --- a/arch/s390/configs/debug_defconfig
> > +++ b/arch/s390/configs/debug_defconfig
> > @@ -100,7 +100,7 @@ CONFIG_UNIXWARE_DISKLABEL=y
> > CONFIG_IOSCHED_BFQ=y
> > CONFIG_BINFMT_MISC=m
> > CONFIG_ZSWAP=y
> > -CONFIG_ZSMALLOC_STAT=y
> > +CONFIG_DEBUG_FS=y
> > CONFIG_SLAB_BUCKETS=y
> > CONFIG_SLUB_STATS=y
> > # CONFIG_COMPAT_BRK is not set
> > diff --git a/arch/s390/configs/defconfig b/arch/s390/configs/defconfig
> > index e00e252d4694..694a309377d5 100644
> > --- a/arch/s390/configs/defconfig
> > +++ b/arch/s390/configs/defconfig
> > @@ -94,7 +94,7 @@ CONFIG_UNIXWARE_DISKLABEL=y
> > CONFIG_IOSCHED_BFQ=y
> > CONFIG_BINFMT_MISC=m
> > CONFIG_ZSWAP=y
> > -CONFIG_ZSMALLOC_STAT=y
> > +CONFIG_DEBUG_FS=y
> > CONFIG_SLAB_BUCKETS=y
> > # CONFIG_COMPAT_BRK is not set
> > CONFIG_MEMORY_HOTPLUG=y
>
> So DEBUG_FS is selected unconditionally? Please, drop this for s390.
CONFIG_ZSMALLOC_STAT used to select DEBUG_FS, so I added
CONFIG_DEBUG_FS=y to keep the stats available.

OK, I'll drop those lines from the s390 defconfigs in v4.
>
> > --
> > Best regards,
> > Xueyuan
>
> Thanks!
>
>