From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,vignesh.raman@collabora.com,vbabka@kernel.org,
tzimmermann@suse.de,svens@linux.ibm.com,surenb@google.com,
skhan@linuxfoundation.org,si.yanteng@linux.dev,simona@ffwll.ch,
senozhatsky@chromium.org,rppt@kernel.org,rdunlap@infradead.org,
nphamcs@gmail.com,mripard@kernel.org,minchan@kernel.org,mhocko@suse.com,
maarten.lankhorst@linux.intel.com,ljs@kernel.org,liam@infradead.org,
helen.fornazier@gmail.com,hca@linux.ibm.com,gor@linux.ibm.com,
dzm91@hust.edu.cn,david@kernel.org,corbet@lwn.net,borntraeger@linux.ibm.com,
alexs@kernel.org,airlied@gmail.com,agordeev@linux.ibm.com,
xueyuan.chen21@gmail.com,akpm@linux-foundation.org
Subject: [to-be-updated] mm-zsmalloc-remove-config_zsmalloc_stat.patch removed from -mm tree
Date: Thu, 12 Nov 2026 19:15:29 -0800 [thread overview]
Message-ID: <20261113031529.D89401F000C4@smtp.kernel.org> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8095 bytes --]
The quilt patch titled
Subject: mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
has been removed from the -mm tree. Its filename was
mm-zsmalloc-remove-config_zsmalloc_stat.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: Xueyuan Chen <xueyuan.chen21@gmail.com>
Subject: mm/zsmalloc: remove CONFIG_ZSMALLOC_STAT
Date: Wed, 11 Nov 2026 20:41:26 +0800
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.
Link: https://lore.kernel.org/20261111-zsmalloc_stat-v3-1-2d85ed51570e@gmail.com
Signed-off-by: Xueyuan Chen <xueyuan.chen21@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Alex Shi <alexs@kernel.org>
Cc: Yanteng Si <si.yanteng@linux.dev>
Cc: Dongliang Mu <dzm91@hust.edu.cn>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Helen Koike <helen.fornazier@gmail.com>
Cc: Vignesh Raman <vignesh.raman@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
---
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(-)
--- a/arch/s390/configs/debug_defconfig~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/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
--- a/arch/s390/configs/defconfig~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/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
--- a/Documentation/mm/zsmalloc.rst~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/Documentation/mm/zsmalloc.rst
@@ -37,8 +37,8 @@ the proper handle-based APIs.
stat
====
-With CONFIG_ZSMALLOC_STAT, we could see zsmalloc internal information via
-``/sys/kernel/debug/zsmalloc/<user name>``. Here is a sample of stat output::
+With CONFIG_DEBUG_FS, we could see zsmalloc internal information via
+``/sys/kernel/debug/zsmalloc/<pool-name>``. Here is a sample of stat output::
# cat /sys/kernel/debug/zsmalloc/zram0/classes
--- a/Documentation/translations/zh_CN/mm/zsmalloc.rst~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/Documentation/translations/zh_CN/mm/zsmalloc.rst
@@ -32,7 +32,7 @@ zs_unmap_object()解除映射。
stat
====
-通过CONFIG_ZSMALLOC_STAT,我们可以通过 ``/sys/kernel/debug/zsmalloc/<user name>``
+启用CONFIG_DEBUG_FS,我们可以通过 ``/sys/kernel/debug/zsmalloc/<pool-name>``
看到zsmalloc内部信息。下面是一个统计输出的例子。::
# cat /sys/kernel/debug/zsmalloc/zram0/classes
--- a/drivers/gpu/drm/ci/arm64.config~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/drivers/gpu/drm/ci/arm64.config
@@ -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
--- a/drivers/gpu/drm/ci/arm.config~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/drivers/gpu/drm/ci/arm.config
@@ -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
--- a/drivers/gpu/drm/ci/x86_64.config~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/drivers/gpu/drm/ci/x86_64.config
@@ -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
--- a/mm/Kconfig~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/mm/Kconfig
@@ -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
--- a/mm/zsmalloc.c~mm-zsmalloc-remove-config_zsmalloc_stat
+++ a/mm/zsmalloc.c
@@ -226,9 +226,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;
@@ -282,9 +280,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
@@ -564,14 +560,10 @@ static inline unsigned long class_stat_r
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);
}
@@ -649,10 +641,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);
@@ -665,25 +655,6 @@ static void zs_pool_stat_destroy(struct
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
_
Patches currently in -mm which might be from xueyuan.chen21@gmail.com are
reply other threads:[~2026-11-13 3:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113031529.D89401F000C4@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=agordeev@linux.ibm.com \
--cc=airlied@gmail.com \
--cc=alexs@kernel.org \
--cc=borntraeger@linux.ibm.com \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=dzm91@hust.edu.cn \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=helen.fornazier@gmail.com \
--cc=liam@infradead.org \
--cc=ljs@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=nphamcs@gmail.com \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=si.yanteng@linux.dev \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=svens@linux.ibm.com \
--cc=tzimmermann@suse.de \
--cc=vbabka@kernel.org \
--cc=vignesh.raman@collabora.com \
--cc=xueyuan.chen21@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.