From: <xu.xin16@zte.com.cn>
To: <xu.xin16@zte.com.cn>, <akpm@linux-foundation.org>
Cc: <shakeel.butt@linux.dev>, <hannes@cmpxchg.org>,
<mhocko@kernel.org>, <roman.gushchin@linux.dev>,
<david@redhat.com>, <chengming.zhou@linux.dev>,
<muchun.song@linux.dev>, <linux-kernel@vger.kernel.org>,
<linux-mm@kvack.org>, <cgroups@vger.kernel.org>
Subject: [PATCH linux-next v3 6/6] Documentation: add KSM statistic counters description
Date: Sun, 21 Sep 2025 23:15:18 +0800 (CST) [thread overview]
Message-ID: <202509212315188885yTwMVyN-Xn_6tuRc3Zi7@zte.com.cn> (raw)
In-Reply-To: <20250921230726978agBBWNsPLi2hCp9Sxed1Y@zte.com.cn>
From: xu xin <xu.xin16@zte.com.cn>
This add KSM-related statistic counters description in cgroup-v2.rst,
including "ksm_rmap_items", "ksm_zero_pages", "ksm_merging_pages" and
"ksm_profit".
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
---
Documentation/admin-guide/cgroup-v2.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index a1e3d431974c..c8c4faa4e3fd 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1776,6 +1776,23 @@ The following nested keys are defined.
up if hugetlb usage is accounted for in memory.current (i.e.
cgroup is mounted with the memory_hugetlb_accounting option).
+ ksm_rmap_items
+ Number of ksm_rmap_item structures in use. The structure
+ ksm_rmap_item stores the reverse mapping information for virtual
+ addresses. KSM will generate a ksm_rmap_item for each
+ ksm-scanned page of the process.
+
+ ksm_zero_pages
+ Number of empty pages are merged with kernel zero pages by KSM,
+ which is only useful when /sys/kernel/mm/ksm/use_zero_pages.
+
+ ksm_merging_pages
+ Number of pages of this process are involved in KSM merging
+ (not including ksm_zero_pages).
+
+ ksm_profit
+ Amount of profitable memory that KSM brings (Saved bytes).
+
memory.numa_stat
A read-only nested-keyed file which exists on non-root cgroups.
--
2.25.1
next prev parent reply other threads:[~2025-09-21 15:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 15:07 [PATCH linux-next v3 0/6] memcg: Support per-memcg KSM metrics xu.xin16
2025-09-21 15:08 ` [PATCH linux-next v3 1/6] memcg: add per-memcg ksm_rmap_items stat xu.xin16
2025-09-23 8:28 ` David Hildenbrand
2025-09-21 15:11 ` [PATCH linux-next v3 2/6] memcg: show ksm_zero_pages count in memory.stat xu.xin16
2025-09-21 15:12 ` [PATCH linux-next v3 3/6] memcg: show ksm_merging_pages xu.xin16
2025-09-21 15:13 ` [PATCH linux-next v3 4/6] ksm: make ksm_process_profit available on CONFIG_PROCFS=n xu.xin16
2025-09-23 8:25 ` David Hildenbrand
2025-09-21 15:14 ` [PATCH linux-next v3 5/6] memcg: add per-memcg ksm_profit xu.xin16
2025-09-21 15:15 ` xu.xin16 [this message]
2025-09-22 8:20 ` [PATCH linux-next v3 0/6] memcg: Support per-memcg KSM metrics Michal Hocko
2025-09-22 9:31 ` 答复: " xu.xin16
2025-09-23 14:17 ` Michal Hocko
2025-09-23 8:26 ` David Hildenbrand
2025-09-23 17:58 ` Shakeel Butt
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=202509212315188885yTwMVyN-Xn_6tuRc3Zi7@zte.com.cn \
--to=xu.xin16@zte.com.cn \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chengming.zhou@linux.dev \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox