Re: [PATCH v2 1/3] mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT

From: Nhat Pham

Date: Tue Nov 10 2026 - 12:10:53 EST


On Mon, Nov 9, 2026 at 5:59 AM Xueyuan Chen <xueyuan.chen21@xxxxxxxxx> 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.
>
> Suggested-by: Nhat Pham <nphamcs@xxxxxxxxx>
> Signed-off-by: Xueyuan Chen <xueyuan.chen21@xxxxxxxxx>
> ---
> mm/zsmalloc.c | 33 ++-------------------------------
> 1 file changed, 2 insertions(+), 31 deletions(-)

FWIW, LGTM:

Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>

But I come from the perspective of large(r) server machines - I'd wait
for the feedback of embedded folks too :)

Sergey, how do you feel about this direction? We've run the stats
collection (even before we select CONFIG_ZSMALLOC_STAT to expose the
stats to userspace) for eons, and it was never a bottleneck AFAICS in
our fleet... And the stats files seem trivial, relatively speaking?