mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
Subsystems (10)
v2 cover mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
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 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]
---
Xueyuan Chen (3):
mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
mm: remove CONFIG_ZSMALLOC_STAT
docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
Documentation/mm/zsmalloc.rst | 2 +- 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, 9 insertions(+), 47 deletions(-)
---
base-commit: fa4ad798f6f681031775266044ba1b0cf3c670bd
Signature · 2 lines
Best regards, Xueyuan
PATCH v2 1/3 mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
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.
--- mm/zsmalloc.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
mm/zsmalloc.c +2 -31
@@ -222,9 +222,7 @@ struct zs_size_stat {unsigned long objs[NR_CLASS_STAT_TYPES ]; }; -#ifdef CONFIG_ZSMALLOC_STAT static struct dentry *zs_stat_root; -#endif static size_t huge_class_size;
@@ -279,9 +277,7 @@ struct zs_pool {/* Compact classes */ struct shrinker *shrinker; -#ifdef CONFIG_ZSMALLOC_STAT struct dentry *stat_dentry; -#endif #ifdef CONFIG_COMPACTION struct work_struct free_work;#endif
@@ -565,14 +561,10 @@ static inline unsigned long class_stat_read(struct size_class *class, int type)return class->stats.objs[type]; } -#ifdef CONFIG_ZSMALLOC_STAT -static void __init zs_stat_init (void ) { -if (!debugfs_initialized ()) { -pr_warn ("debugfs not available, stat dir not created\n" ); +if (!debugfs_initialized ())return ; - } zs_stat_root =debugfs_create_dir ("zsmalloc" ,NULL ); }
@@ -650,10 +642,8 @@ DEFINE_SHOW_ATTRIBUTE(zs_stats_size);static void zs_pool_stat_create (struct zs_pool *pool,const char *name) { -if (!zs_stat_root) { -pr_warn ("no root stat dir, not creating <%s> stat dir\n" , name); +if (IS_ERR_OR_NULL (zs_stat_root))return ; - } pool->stat_dentry =debugfs_create_dir (name, zs_stat_root);
@@ -666,25 +656,6 @@ static void zs_pool_stat_destroy(struct zs_pool *pool)debugfs_remove_recursive (pool->stat_dentry); } -#else /* CONFIG_ZSMALLOC_STAT */ -static void __init zs_stat_init (void ) -{ -} - -static void __exit zs_stat_exit(void) -{ -} - -static inline void zs_pool_stat_create (struct zs_pool *pool,const char *name) -{ -} - -static inline void zs_pool_stat_destroy (struct zs_pool *pool) -{ -} -#endif - -/* * For each size class, zspages are divided into different groups * depending on their usage ratio. This function returns fullness
Signature · 1 line
2.47.3
Quoted 8 lines · Xueyuan Chen
CONFIG_ZSMALLOC_STATonly controls the debugfs interface. The class counters are updated regardless of this option.Remove the
CONFIG_ZSMALLOC_STATguards and rely on the debugfs API stubs whenCONFIG_DEBUG_FS=n. Skip statistics setup silently when debugfs is unavailable.
Quoted 5 lines
Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>--- mm/zsmalloc.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
FWIW, LGTM:
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?
Sergey Senozhatsky
maintainerQuoted 19 lines · Nhat Pham
Quoted 8 lines · Xueyuan Chen
CONFIG_ZSMALLOC_STATonly controls the debugfs interface. The class counters are updated regardless of this option.Remove the
CONFIG_ZSMALLOC_STATguards and rely on the debugfs API stubs whenCONFIG_DEBUG_FS=n. Skip statistics setup silently when debugfs is unavailable.Quoted 5 lines
Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>--- mm/zsmalloc.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)FWIW, LGTM:
Reviewed-by Nhat Pham <[email protected]>
Quoted 7 lines
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_STATto 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?
Yeah I guess I'm fine with this change.
I think this can be just one patch.
Quoted 23 lines · Sergey Senozhatsky
Quoted 22 lines · Nhat Pham
Quoted 8 lines · Xueyuan Chen
CONFIG_ZSMALLOC_STATonly controls the debugfs interface. The class counters are updated regardless of this option.Remove the
CONFIG_ZSMALLOC_STATguards and rely on the debugfs API stubs whenCONFIG_DEBUG_FS=n. Skip statistics setup silently when debugfs is unavailable.Quoted 5 lines
Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>--- mm/zsmalloc.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)FWIW, LGTM:
Reviewed-by Nhat Pham <[email protected]>But I come from the perspective of large(r) server machines - I'd wait for the feedback of embedded folks too :)
Quoted 8 lines
Quoted 4 lines
Sergey, how do you feel about this direction? We've run the stats collection (even before we select
CONFIG_ZSMALLOC_STATto 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?Yeah I guess I'm fine with this change.
I think this can be just one patch.
Yeah, Nhat had the same suggestion. I'll squash them into one patch in v3.
Quoted 15 lines · Nhat Pham
Quoted 8 lines · Xueyuan Chen
CONFIG_ZSMALLOC_STATonly controls the debugfs interface. The class counters are updated regardless of this option.Remove the
CONFIG_ZSMALLOC_STATguards and rely on the debugfs API stubs whenCONFIG_DEBUG_FS=n. Skip statistics setup silently when debugfs is unavailable.Quoted 5 lines
Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>--- mm/zsmalloc.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-)
Quoted 3 lines
FWIW, LGTM:
Reviewed-by Nhat Pham <[email protected]>
Thanks for the review!
Quoted 3 lines
But I come from the perspective of large(r) server machines - I'd wait for the feedback of embedded folks too :)
I also tested the memory overhead. For a typical Android setup with one zram pool, the additional inode/dentry slab object footprint is about 2.11 KB. Even with 32 pools, it's only about 45.7 KB.
I think this overhead is acceptable for embedded devices.
Quoted 6 lines
Sergey, how do you feel about this direction? We've run the stats collection (even before we select
CONFIG_ZSMALLOC_STATto 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?
PATCH v2 2/3 mm: remove CONFIG_ZSMALLOC_STAT
In reply to Xueyuan ChenThe statistics interface now uses the debugfs API stubs directly, so CONFIG_ZSMALLOC_STAT no longer controls any zsmalloc code.
Remove the Kconfig entry. Replace the remaining CONFIG_ZSMALLOC_STAT settings with CONFIG_DEBUG_FS=y.
--- 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 --------- 6 files changed, 5 insertions(+), 14 deletions(-)
arch/s390/configs/debug_defconfig +1 -1
@@ -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
arch/s390/configs/defconfig +1 -1
@@ -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
drivers/gpu/drm/ci/arm.config +1 -1
@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y # abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=n
drivers/gpu/drm/ci/arm64.config +1 -1
@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y # abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=n
drivers/gpu/drm/ci/x86_64.config +1 -1
@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y CONFIG_PWM=y CONFIG_PM_DEVFREQ=y
mm/Kconfig +0 -9
@@ -130,15 +130,6 @@ menu "Zsmalloc allocator options" comment "Zsmalloc is a common backend allocator for zswap & zram" -config ZSMALLOC_STAT - bool "Export zsmalloc statistics" - select DEBUG_FS - help - This option enables code in the zsmalloc to collect various - statistics about what's happening in zsmalloc and exports that - information to userspace via debugfs. - If unsure, say N. - config ZSMALLOC_CHAIN_SIZE int "Maximum number of physical pages per-zspage" default 8
Signature · 1 line
2.47.3
Re: [PATCH v2 2/3] mm: remove CONFIG_ZSMALLOC_STAT
Quoted 9 lines · Xueyuan Chen
The statistics interface now uses the debugfs API stubs directly, so
CONFIG_ZSMALLOC_STATno longer controls any zsmalloc code.Remove the
Kconfigentry. Replace the remainingCONFIG_ZSMALLOC_STATsettings withCONFIG_DEBUG_FS=y.Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>
I wonder if we can just squash all 3 patches lol. Anyway, LGTM:
Sergey Senozhatsky
maintainerRe: [PATCH v2 2/3] mm: remove CONFIG_ZSMALLOC_STAT
Quoted 5 lines · Nhat Pham
Quoted 4 lines · Xueyuan Chen
The statistics interface now uses the debugfs API stubs directly, so
CONFIG_ZSMALLOC_STATno longer controls any zsmalloc code.
Quoted 7 lines
Quoted 5 lines
Remove the
Kconfigentry. Replace the remainingCONFIG_ZSMALLOC_STATsettings withCONFIG_DEBUG_FS=y.Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>I wonder if we can just squash all 3 patches lol
I agree. Let's have just one patch.
Re: [PATCH v2 2/3] mm: remove CONFIG_ZSMALLOC_STAT
In reply to Nhat PhamQuoted 5 lines · Nhat Pham
Quoted 4 lines · Xueyuan Chen
The statistics interface now uses the debugfs API stubs directly, so
CONFIG_ZSMALLOC_STATno longer controls any zsmalloc code.
Quoted 7 lines
Quoted 5 lines
Remove the
Kconfigentry. Replace the remainingCONFIG_ZSMALLOC_STATsettings withCONFIG_DEBUG_FS=y.Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>I wonder if we can just squash all 3 patches lol. Anyway, LGTM:
Haha, agreed. I'll squash all three into one in v3.
Quoted 3 lines
Reviewed-by Nhat Pham <[email protected]>
Thanks!
Sergey Senozhatsky
maintainerRe: [PATCH v2 2/3] mm: remove CONFIG_ZSMALLOC_STAT
In reply to Xueyuan ChenOn (26/11/09 20:59), Xueyuan Chen wrote:
[..]
Quoted 65 lines
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 --------- 6 files changed, 5 insertions(+), 14 deletions(-)arch/s390/configs/debug_defconfig +1
-1@@ -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 setarch/s390/configs/defconfig +1
-1@@ -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=ydrivers/gpu/drm/ci/arm.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y # abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=ndrivers/gpu/drm/ci/arm64.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y # abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=ndrivers/gpu/drm/ci/x86_64.config +0
-0
drivers/gpu/drm/ci/x86_64.config CONFIG_CRYPTO_ZSTD=y · line 8
Quoted 5 lines
drivers/gpu/drm/ci/x86_64.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y
Really not sure what those are. I'd rather prefer not to touch any configs at all.
Sergey Senozhatsky
maintainerRe: [PATCH v2 2/3] mm: remove CONFIG_ZSMALLOC_STAT
On (26/11/11 13:33), Sergey Senozhatsky wrote:
[..]
Quoted 50 lines
Quoted 50 lines
arch/s390/configs/debug_defconfig +1
-1@@ -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 setarch/s390/configs/defconfig +1
-1@@ -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=ydrivers/gpu/drm/ci/arm.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y # abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=ndrivers/gpu/drm/ci/arm64.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=y
Quoted 15 lines
drivers/gpu/drm/ci/x86_64.config CONFIG_CRYPTO_ZSTD=y · line 8
Quoted 12 lines
drivers/gpu/drm/ci/arm64.config +0
-0# abootimg with a 'dummy' rootfs fails with root=/dev/nfs CONFIG_BLK_DEV_INITRD=ndrivers/gpu/drm/ci/x86_64.config +1
-1@@ -5,7 +5,7 @@ CONFIG_CRYPTO_ZSTD=y CONFIG_ZRAM_MEMORY_TRACKING=y CONFIG_ZRAM_WRITEBACK=y CONFIG_ZRAM=y -CONFIG_ZSMALLOC_STAT=y +CONFIG_DEBUG_FS=yReally not sure what those are. I'd rather prefer not to touch any configs at all.
Never mind, scratch my last comment.
PATCH v2 3/3 docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
In reply to Xueyuan ChenZsmalloc statistics are now available when debugfs is enabled. Replace references to CONFIG_ZSMALLOC_STAT with CONFIG_DEBUG_FS in the English and Chinese documentation.
--- Documentation/mm/zsmalloc.rst | 2 +- Documentation/translations/zh_CN/mm/zsmalloc.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/mm/zsmalloc.rst +1 -1
@@ -33,7 +33,7 @@ proper handle-based APIs. stat ==== -With CONFIG_ZSMALLOC_STAT, we could see zsmalloc internal information via +With CONFIG_DEBUG_FS, we could see zsmalloc internal information via ``/sys/kernel/debug/zsmalloc/<user name>``. Here is a sample of stat output:: # cat /sys/kernel/debug/zsmalloc/zram0/classes
Documentation/translations/zh_CN/mm/zsmalloc.rst +1 -1
@@ -32,7 +32,7 @@ zs_unmap_object()解除映射。 stat ==== -通过CONFIG_ZSMALLOC_STAT,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>`` +通过CONFIG_DEBUG_FS,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>`` 看到zsmalloc内部信息。下面是一个统计输出的例子。:: # cat /sys/kernel/debug/zsmalloc/zram0/classes
Signature · 1 line
2.47.3
Re: [PATCH v2 3/3] docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
Quoted 7 lines · Xueyuan Chen
Zsmalloc statistics are now available when debugfs is enabled. Replace references to
CONFIG_ZSMALLOC_STATwithCONFIG_DEBUG_FSin the English and Chinese documentation.Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>
For the English documentation:
(but I'm mildly certain the Chinese one is also correct :))
Re: [PATCH v2 3/3] docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
Quoted 6 lines · Nhat Pham
Quoted 5 lines · Xueyuan Chen
Zsmalloc statistics are now available when debugfs is enabled. Replace references to
CONFIG_ZSMALLOC_STATwithCONFIG_DEBUG_FSin the English and Chinese documentation.
Quoted 6 lines
Quoted 2 lines
Suggested-by Nhat Pham <[email protected]>Signed-off-by Xueyuan Chen <[email protected]>For the English documentation:
Reviewed-by Nhat Pham <[email protected]>
Thanks!
Quoted 3 lines
(but I'm mildly certain the Chinese one is also correct :))
Actually, I didn't look too closely at the Chinese doc. :) "通过" sounds a bit unnatural here. I'll change it to "启用" in v3.
Sergey Senozhatsky
maintainerRe: [PATCH v2 3/3] docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
In reply to Xueyuan ChenQuoted 3 lines · Xueyuan Chen
-通过CONFIG_ZSMALLOC_STAT,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>`` +通过CONFIG_DEBUG_FS,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>``
看到zsmalloc内部信息。下面是一个统计输出的例子。::
Just out of curiosity, what does <user name> mean? The stats are at /sys/kernel/debug/zsmalloc/zramN/classes, where N is zram device number.
Re: [PATCH v2 3/3] docs: zsmalloc: describe statistics with CONFIG_DEBUG_FS
Quoted 9 lines · Sergey Senozhatsky
Quoted 3 lines · Xueyuan Chen
-通过CONFIG_ZSMALLOC_STAT,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>`` +通过CONFIG_DEBUG_FS,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>``
看到zsmalloc内部信息。下面是一个统计输出的例子。::Just out of curiosity, what does <user name> mean? The stats are at
/sys/kernel/debug/zsmalloc/zramN/classes, where N is zram device number.
I guess "user" refers to a zsmalloc user, like zram. But yeah, <pool-name> is clearer. I'll fix it in v3.