summaryrefslogtreecommitdiff
path: root/include/linux/vm_event_item.h
diff options
context:
space:
mode:
authorYang Yang <yang.yang29@zte.com.cn>2022-04-29 09:16:16 +0300
committerakpm <akpm@linux-foundation.org>2022-04-29 09:16:16 +0300
commit94bfe85bde18a99612bb5d0ce348643c2d352836 (patch)
tree1090ea49642e829f743f4d020fb9ccb66065c36b /include/linux/vm_event_item.h
parent7609385337a4feb6236e42dcd0df2185683ce839 (diff)
downloadlinux-94bfe85bde18a99612bb5d0ce348643c2d352836.tar.xz
mm/vmstat: add events for ksm cow
Users may use ksm by calling madvise(, , MADV_MERGEABLE) when they want to save memory, it's a tradeoff by suffering delay on ksm cow. Users can get to know how much memory ksm saved by reading /sys/kernel/mm/ksm/pages_sharing, but they don't know what's the costs of ksm cow, and this is important of some delay sensitive tasks. So add ksm cow events to help users evaluate whether or how to use ksm. Also update Documentation/admin-guide/mm/ksm.rst with new added events. Link: https://lkml.kernel.org/r/20220331035616.2390805-1-yang.yang29@zte.com.cn Signed-off-by: Yang Yang <yang.yang29@zte.com.cn> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: xu xin <xu.xin16@zte.com.cn> Reviewed-by: Ran Xiaokai <ran.xiaokai@zte.com.cn> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Saravanan D <saravanand@fb.com> Cc: Minchan Kim <minchan@kernel.org> Cc: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/vm_event_item.h')
-rw-r--r--include/linux/vm_event_item.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
index 16a0a4fd000b..e83967e4c20e 100644
--- a/include/linux/vm_event_item.h
+++ b/include/linux/vm_event_item.h
@@ -133,6 +133,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
KSM_SWPIN_COPY,
#endif
#endif
+#ifdef CONFIG_KSM
+ COW_KSM,
+#endif
#ifdef CONFIG_X86
DIRECT_MAP_LEVEL2_SPLIT,
DIRECT_MAP_LEVEL3_SPLIT,