[PATCH v2] Docs/admin-guide/cgroup-v2: fix npn tags in memory.stat
From: Yu Miao
Date: Wed Nov 18 2026 - 08:06:43 EST
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@xxxxxxxxxx>
---
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@xxxxxxxxx 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