* [PATCH] Docs/admin-guide/cgroup-v2: add missing npn tags to zswap stats
@ 2026-11-17 6:26 Yu Miao
2026-11-17 21:20 ` Tejun Heo
2026-11-18 13:05 ` [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat Yu Miao
0 siblings, 2 replies; 5+ messages in thread
From: Yu Miao @ 2026-11-17 6:26 UTC (permalink / raw)
To: cgroups, tj, hannes, mkoutny, corbet, skhan, rdunlap, linux-doc,
linux-kernel
Cc: jiayuan.chen, nphamcs, Yu Miao
The zswap, zswapped and zswap_incomp entries never show up in
memory.numa_stat, so add the 'npn' tag to all three. Also move
zswap_incomp, currently listed between the zswpwb and thp_fault_alloc
counters, next to the zswap and zswapped entries it belongs with.
Signed-off-by: Yu Miao <yumiao@kylinos.cn>
---
Documentation/admin-guide/cgroup-v2.rst | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 9e3c67b02ae2..3f698f109d89 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1608,12 +1608,18 @@ The following nested keys are defined.
Amount of cached filesystem data that is swap-backed,
such as tmpfs, shm segments, shared anonymous mmap()s
- zswap
+ zswap (npn)
Amount of memory consumed by the zswap compression backend.
- zswapped
+ zswapped (npn)
Amount of application memory swapped out to zswap.
+ zswap_incomp (npn)
+ Amount of memory used by incompressible pages currently
+ stored in zswap without compression. These pages could not
+ be compressed to a size smaller than PAGE_SIZE, so they are
+ stored as-is.
+
file_mapped
Amount of cached filesystem data mapped with mmap(). Note
that some kernel configurations might account complete
@@ -1765,11 +1771,6 @@ The following nested keys are defined.
zswpwb
Number of pages written from zswap to swap.
- zswap_incomp
- Amount of memory used by incompressible pages currently stored in zswap
- without compression. These pages could not be compressed to
- a size smaller than PAGE_SIZE, so they are stored as-is.
-
thp_fault_alloc (npn)
Number of transparent hugepages which were allocated to satisfy
a page fault. This counter is not present when CONFIG_TRANSPARENT_HUGEPAGE
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Docs/admin-guide/cgroup-v2: add missing npn tags to zswap stats
2026-11-17 6:26 [PATCH] Docs/admin-guide/cgroup-v2: add missing npn tags to zswap stats Yu Miao
@ 2026-11-17 21:20 ` Tejun Heo
2026-11-18 13:05 ` [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat Yu Miao
1 sibling, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2026-11-17 21:20 UTC (permalink / raw)
To: Yu Miao
Cc: cgroups, hannes, mkoutny, corbet, skhan, rdunlap, linux-doc,
linux-kernel, jiayuan.chen, nphamcs
Hello,
On Tue, Nov 17, 2026 at 02:26:20PM +0800, Yu Miao wrote:
> The zswap, zswapped and zswap_incomp entries never show up in
> memory.numa_stat, so add the 'npn' tag to all three.
The npn tags are off in other places too. Can you fix them all while at
it?
- swpin_zero, swpout_zero, zswpin, zswpout and zswpwb aren't in
memory.numa_stat either and are missing the tag.
- pgscan_{kswapd,direct,khugepaged,proactive}, the matching pgsteal_*
and pgrefill are in memory.numa_stat since e4f4fc7aa8b7 ("mm: move
pgscan, pgsteal, pgrefill to node stats") and shouldn't carry the tag
anymore. The pgscan and pgsteal totals are still npn.
Also, this should go through -mm. Can you please cc Andrew Morton
<akpm@linux-foundation.org> and linux-mm@kvack.org when reposting?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat
2026-11-17 6:26 [PATCH] Docs/admin-guide/cgroup-v2: add missing npn tags to zswap stats Yu Miao
2026-11-17 21:20 ` Tejun Heo
@ 2026-11-18 13:05 ` Yu Miao
2026-11-18 16:09 ` Nhat Pham
2026-11-19 8:53 ` Tejun Heo
1 sibling, 2 replies; 5+ messages in thread
From: Yu Miao @ 2026-11-18 13:05 UTC (permalink / raw)
To: cgroups, tj, hannes, mkoutny, corbet, skhan, rdunlap, linux-doc,
linux-kernel
Cc: akpm, linux-mm, jiayuan.chen, nphamcs, Yu Miao
The zswap, zswapped, zswap_incomp, swpin_zero, swpout_zero, zswpin,
zswpout and zswpwb entries never show up in memory.numa_stat, so add
the 'npn' tag to them. The pgscan_kswapd, pgscan_direct,
pgscan_khugepaged, pgscan_proactive, pgsteal_kswapd, pgsteal_direct,
pgsteal_khugepaged, pgsteal_proactive and pgrefill entries do show up
in memory.numa_stat since commit e4f4fc7aa8b7 ("mm: move pgscan,
pgsteal, pgrefill to node stats"), so remove their 'npn' tag.
Also move zswap_incomp, currently listed between the zswpwb and
thp_fault_alloc counters, next to the zswap and zswapped entries
it belongs with.
Signed-off-by: Yu Miao <yumiao@kylinos.cn>
---
Changes in v2 (per Tejun's review):
- Add the tag to swpin_zero, swpout_zero, zswpin, zswpout and zswpwb.
- Remove the tag from pgscan_kswapd, pgscan_direct, pgscan_khugepaged,
pgscan_proactive, pgsteal_kswapd, pgsteal_direct, pgsteal_khugepaged,
pgsteal_proactive and pgrefill, which have been in memory.numa_stat
since commit e4f4fc7aa8b7 ("mm: move pgscan, pgsteal, pgrefill to
node stats").
- Repost via -mm with Andrew Morton and linux-mm@kvack.org cc'ed.
Documentation/admin-guide/cgroup-v2.rst | 43 +++++++++++++------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 9e3c67b02ae2..a50ce3c833c0 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1608,12 +1608,18 @@ The following nested keys are defined.
Amount of cached filesystem data that is swap-backed,
such as tmpfs, shm segments, shared anonymous mmap()s
- zswap
+ zswap (npn)
Amount of memory consumed by the zswap compression backend.
- zswapped
+ zswapped (npn)
Amount of application memory swapped out to zswap.
+ zswap_incomp (npn)
+ Amount of memory used by incompressible pages currently
+ stored in zswap without compression. These pages could not
+ be compressed to a size smaller than PAGE_SIZE, so they are
+ stored as-is.
+
file_mapped
Amount of cached filesystem data mapped with mmap(). Note
that some kernel configurations might account complete
@@ -1702,28 +1708,28 @@ The following nested keys are defined.
pgsteal (npn)
Amount of reclaimed pages
- pgscan_kswapd (npn)
+ pgscan_kswapd
Amount of scanned pages by kswapd (in an inactive LRU list)
- pgscan_direct (npn)
+ pgscan_direct
Amount of scanned pages directly (in an inactive LRU list)
- pgscan_khugepaged (npn)
+ pgscan_khugepaged
Amount of scanned pages by khugepaged (in an inactive LRU list)
- pgscan_proactive (npn)
+ pgscan_proactive
Amount of scanned pages proactively (in an inactive LRU list)
- pgsteal_kswapd (npn)
+ pgsteal_kswapd
Amount of reclaimed pages by kswapd
- pgsteal_direct (npn)
+ pgsteal_direct
Amount of reclaimed pages directly
- pgsteal_khugepaged (npn)
+ pgsteal_khugepaged
Amount of reclaimed pages by khugepaged
- pgsteal_proactive (npn)
+ pgsteal_proactive
Amount of reclaimed pages proactively
pgfault (npn)
@@ -1732,7 +1738,7 @@ The following nested keys are defined.
pgmajfault (npn)
Number of major page faults incurred
- pgrefill (npn)
+ pgrefill
Amount of scanned pages (in an active LRU list)
pgactivate (npn)
@@ -1747,29 +1753,24 @@ The following nested keys are defined.
pglazyfreed (npn)
Amount of reclaimed lazyfree pages
- swpin_zero
+ swpin_zero (npn)
Number of pages swapped into memory and filled with zero, where I/O
was optimized out because the page content was detected to be zero
during swapout.
- swpout_zero
+ swpout_zero (npn)
Number of zero-filled pages swapped out with I/O skipped due to the
content being detected as zero.
- zswpin
+ zswpin (npn)
Number of pages moved in to memory from zswap.
- zswpout
+ zswpout (npn)
Number of pages moved out of memory to zswap.
- zswpwb
+ zswpwb (npn)
Number of pages written from zswap to swap.
- zswap_incomp
- Amount of memory used by incompressible pages currently stored in zswap
- without compression. These pages could not be compressed to
- a size smaller than PAGE_SIZE, so they are stored as-is.
-
thp_fault_alloc (npn)
Number of transparent hugepages which were allocated to satisfy
a page fault. This counter is not present when CONFIG_TRANSPARENT_HUGEPAGE
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat
2026-11-18 13:05 ` [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat Yu Miao
@ 2026-11-18 16:09 ` Nhat Pham
2026-11-19 8:53 ` Tejun Heo
1 sibling, 0 replies; 5+ messages in thread
From: Nhat Pham @ 2026-11-18 16:09 UTC (permalink / raw)
To: Yu Miao
Cc: cgroups, tj, hannes, mkoutny, corbet, skhan, rdunlap, linux-doc,
linux-kernel, akpm, linux-mm, jiayuan.chen
On Wed, Nov 18, 2026 at 5:06 AM Yu Miao <yumiao@kylinos.cn> wrote:
>
> The zswap, zswapped, zswap_incomp, swpin_zero, swpout_zero, zswpin,
> zswpout and zswpwb entries never show up in memory.numa_stat, so add
For the (z)swap one:
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
(but the rest LGTM too FWIW).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat
2026-11-18 13:05 ` [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat Yu Miao
2026-11-18 16:09 ` Nhat Pham
@ 2026-11-19 8:53 ` Tejun Heo
1 sibling, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2026-11-19 8:53 UTC (permalink / raw)
To: Yu Miao
Cc: cgroups, hannes, mkoutny, corbet, skhan, rdunlap, linux-doc,
linux-kernel, akpm, linux-mm, jiayuan.chen, nphamcs
On Wed, Nov 18, 2026 at 09:05:37PM +0800, Yu Miao wrote:
> The zswap, zswapped, zswap_incomp, swpin_zero, swpout_zero, zswpin,
> zswpout and zswpwb entries never show up in memory.numa_stat, so add
> the 'npn' tag to them. The pgscan_kswapd, pgscan_direct,
> pgscan_khugepaged, pgscan_proactive, pgsteal_kswapd, pgsteal_direct,
> pgsteal_khugepaged, pgsteal_proactive and pgrefill entries do show up
> in memory.numa_stat since commit e4f4fc7aa8b7 ("mm: move pgscan,
> pgsteal, pgrefill to node stats"), so remove their 'npn' tag.
> Also move zswap_incomp, currently listed between the zswpwb and
> thp_fault_alloc counters, next to the zswap and zswapped entries
> it belongs with.
>
> Signed-off-by: Yu Miao <yumiao@kylinos.cn>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 8:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 6:26 [PATCH] Docs/admin-guide/cgroup-v2: add missing npn tags to zswap stats Yu Miao
2026-11-17 21:20 ` Tejun Heo
2026-11-18 13:05 ` [PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat Yu Miao
2026-11-18 16:09 ` Nhat Pham
2026-11-19 8:53 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox