On 11/11/26 4:41 AM, 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 <[email protected]>
> Reviewed-by: Nhat Pham <[email protected]>
> Signed-off-by: Xueyuan Chen <[email protected]>

Reviewed-by: Randy Dunlap <[email protected]>
Thanks.

> ---
> Drop CONFIG_ZSMALLOC_STAT instead of making the counters conditional. The
> option only controls the debugfs interface, while the class counters are
> updated unconditionally. Removing it simplifies the code.
> 
> Following Nhat's suggestion, remove CONFIG_ZSMALLOC_STAT and rely on
> the existing debugfs API stubs when CONFIG_DEBUG_FS=n.
> ---
> Changes in v3:
> - Squash the three patches into one (Nhat, Sergey).
> - Add Nhat's Reviewed-by.
> - Update the documentation wording.
> - Link to v2: 
> https://patch.msgid.link/[email protected]
> 
> Changes in v2:
> - Drop CONFIG_ZSMALLOC_STAT instead of making the counters conditional.
> - Update configuration files and documentation.
> - Link to v1: 
> https://patch.msgid.link/[email protected]
> ---
>  Documentation/mm/zsmalloc.rst                    |  4 +--
>  Documentation/translations/zh_CN/mm/zsmalloc.rst |  2 +-
>  arch/s390/configs/debug_defconfig                |  2 +-
>  arch/s390/configs/defconfig                      |  2 +-
>  drivers/gpu/drm/ci/arm.config                    |  2 +-
>  drivers/gpu/drm/ci/arm64.config                  |  2 +-
>  drivers/gpu/drm/ci/x86_64.config                 |  2 +-
>  mm/Kconfig                                       |  9 -------
>  mm/zsmalloc.c                                    | 33 
> ++----------------------
>  9 files changed, 10 insertions(+), 48 deletions(-)


-- 
~Randy

Reply via email to