1f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm
2f00dc0eeSPetr HolasekDate:		September 2009
3f00dc0eeSPetr HolasekKernelVersion:	2.6.32
4f00dc0eeSPetr HolasekContact:	Linux memory management mailing list <linux-mm@kvack.org>
5f00dc0eeSPetr HolasekDescription:	Interface for Kernel Samepage Merging (KSM)
6f00dc0eeSPetr Holasek
7f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/full_scans
8f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/pages_shared
9f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/pages_sharing
10f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/pages_to_scan
11f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/pages_unshared
12f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/pages_volatile
13f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/run
14f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/sleep_millisecs
15f00dc0eeSPetr HolasekDate:		September 2009
16f00dc0eeSPetr HolasekContact:	Linux memory management mailing list <linux-mm@kvack.org>
17f00dc0eeSPetr HolasekDescription:	Kernel Samepage Merging daemon sysfs interface
18f00dc0eeSPetr Holasek
19f00dc0eeSPetr Holasek		full_scans: how many times all mergeable areas have been
20f00dc0eeSPetr Holasek		scanned.
21f00dc0eeSPetr Holasek
22f00dc0eeSPetr Holasek		pages_shared: how many shared pages are being used.
23f00dc0eeSPetr Holasek
24f00dc0eeSPetr Holasek		pages_sharing: how many more sites are sharing them i.e. how
25f00dc0eeSPetr Holasek		much saved.
26f00dc0eeSPetr Holasek
27f00dc0eeSPetr Holasek		pages_to_scan: how many present pages to scan before ksmd goes
28f00dc0eeSPetr Holasek		to sleep.
29f00dc0eeSPetr Holasek
30f00dc0eeSPetr Holasek		pages_unshared: how many pages unique but repeatedly checked
31f00dc0eeSPetr Holasek		for merging.
32f00dc0eeSPetr Holasek
33f00dc0eeSPetr Holasek		pages_volatile: how many pages changing too fast to be placed
34f00dc0eeSPetr Holasek		in a tree.
35f00dc0eeSPetr Holasek
36f00dc0eeSPetr Holasek		run: write 0 to disable ksm, read 0 while ksm is disabled.
3754a19b4dSMauro Carvalho Chehab
3854a19b4dSMauro Carvalho Chehab			- write 1 to run ksm, read 1 while ksm is running.
3954a19b4dSMauro Carvalho Chehab			- write 2 to disable ksm and unmerge all its pages.
40f00dc0eeSPetr Holasek
41f00dc0eeSPetr Holasek		sleep_millisecs: how many milliseconds ksm should sleep between
42f00dc0eeSPetr Holasek		scans.
43f00dc0eeSPetr Holasek
44ee65728eSMike Rapoport		See Documentation/mm/ksm.rst for more information.
45f00dc0eeSPetr Holasek
46f00dc0eeSPetr HolasekWhat:		/sys/kernel/mm/ksm/merge_across_nodes
47f00dc0eeSPetr HolasekDate:		January 2013
48f00dc0eeSPetr HolasekKernelVersion:	3.9
49f00dc0eeSPetr HolasekContact:	Linux memory management mailing list <linux-mm@kvack.org>
50f00dc0eeSPetr HolasekDescription:	Control merging pages across different NUMA nodes.
51f00dc0eeSPetr Holasek
52f00dc0eeSPetr Holasek		When it is set to 0 only pages from the same node are merged,
53f00dc0eeSPetr Holasek		otherwise pages from all nodes can be merged together (default).
54*d21077fbSStefan Roesch
55*d21077fbSStefan RoeschWhat:		/sys/kernel/mm/ksm/general_profit
56*d21077fbSStefan RoeschDate:		April 2023
57*d21077fbSStefan RoeschKernelVersion:  6.4
58*d21077fbSStefan RoeschContact:	Linux memory management mailing list <linux-mm@kvack.org>
59*d21077fbSStefan RoeschDescription:	Measure how effective KSM is.
60*d21077fbSStefan Roesch		general_profit: how effective is KSM. The formula for the
61*d21077fbSStefan Roesch		calculation is in Documentation/admin-guide/mm/ksm.rst.
62