* [merged mm-stable] documentation-add-ksm_stat-description-in-cgroup-v1-memoryrst.patch removed from -mm tree
@ 2025-05-13 6:55 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-13 6:55 UTC (permalink / raw)
To: mm-commits, yang.yang29, wang.yaxin, songmuchun, shakeel.butt,
roman.gushchin, muchun.song, mhocko, mhocko, hannes, david,
chen.haonan2, xu.xin16, akpm
The quilt patch titled
Subject: Documentation: add ksm_stat description in cgroup-v1/memory.rst
has been removed from the -mm tree. Its filename was
documentation-add-ksm_stat-description-in-cgroup-v1-memoryrst.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: xu xin <xu.xin16@zte.com.cn>
Subject: Documentation: add ksm_stat description in cgroup-v1/memory.rst
Date: Thu, 1 May 2025 04:17:13 +0000
This updates ksm_stat description in cgroup-v1/memory.rst.
Link: https://lkml.kernel.org/r/20250501041713.3324621-1-xu.xin16@zte.com.cn
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Cc: David Hildenbrand <david@redhat.com>
Cc: Haonan Chen <chen.haonan2@zte.com.cn>
Cc: Wang Yaxin <wang.yaxin@zte.com.cn>
Cc: Yang Yang <yang.yang29@zte.com.cn>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/admin-guide/cgroup-v1/memory.rst | 36 +++++++++++++++
1 file changed, 36 insertions(+)
--- a/Documentation/admin-guide/cgroup-v1/memory.rst~documentation-add-ksm_stat-description-in-cgroup-v1-memoryrst
+++ a/Documentation/admin-guide/cgroup-v1/memory.rst
@@ -97,6 +97,8 @@ Brief summary of control files.
used.
memory.numa_stat show the number of memory usage per numa
node
+ memory.ksm_stat show the statistic information about various ksm
+ counters
memory.kmem.limit_in_bytes Deprecated knob to set and read the kernel
memory hard limit. Kernel hard limit is not
supported since 5.16. Writing any value to
@@ -674,6 +676,40 @@ The output format of memory.numa_stat is
The "total" count is sum of file + anon + unevictable.
+.. _memcg_ksm_stat:
+
+5.7 ksm_stat
+------------
+
+When CONFIG_KSM is enabled, the ksm_stat file can be used to observe the ksm
+merging status of the processes within an memory cgroup.
+
+The output format of memory.ksm_stat is::
+
+ ksm_rmap_items <number>
+ ksm_zero_pages <number>
+ ksm_merging_pages <number>
+ ksm_profit <number>
+
+The "ksm_rmap_items" count specifies the number of ksm_rmap_item structures in
+use. The structureksm_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.
+
+The "ksm_zero_pages" count specifies represent how many empty pages are merged
+with kernel zero pages by KSM, which is useful when /sys/kernel/mm/ksm/use_zero_pages
+is enabled.
+
+The "ksm_merging_pages" count specifies how many pages of this process are involved
+in KSM merging (not including ksm_zero_pages).
+
+The "ksm_process_profit" count specifies the profit that KSM brings (Saved bytes).
+KSM can save memory by merging identical pages, but also can consume additional
+memory, because it needs to generate a number of rmap_items to save each scanned
+page's brief rmap information. Some of these pages may be merged, but some may not
+be abled to be merged after being checked several times, which are unprofitable
+memory consumed.
+
6. Hierarchy support
====================
_
Patches currently in -mm which might be from xu.xin16@zte.com.cn are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-13 6:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 6:55 [merged mm-stable] documentation-add-ksm_stat-description-in-cgroup-v1-memoryrst.patch removed from -mm tree Andrew Morton
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.