^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/kernel/mm/ksm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: September 2009
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) KernelVersion: 2.6.32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Contact: Linux memory management mailing list <linux-mm@kvack.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Description: Interface for Kernel Samepage Merging (KSM)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) What: /sys/kernel/mm/ksm/full_scans
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) What: /sys/kernel/mm/ksm/pages_shared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) What: /sys/kernel/mm/ksm/pages_sharing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) What: /sys/kernel/mm/ksm/pages_to_scan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) What: /sys/kernel/mm/ksm/pages_unshared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) What: /sys/kernel/mm/ksm/pages_volatile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) What: /sys/kernel/mm/ksm/run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) What: /sys/kernel/mm/ksm/sleep_millisecs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Date: September 2009
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Contact: Linux memory management mailing list <linux-mm@kvack.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Description: Kernel Samepage Merging daemon sysfs interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) full_scans: how many times all mergeable areas have been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) scanned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) pages_shared: how many shared pages are being used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) pages_sharing: how many more sites are sharing them i.e. how
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) much saved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) pages_to_scan: how many present pages to scan before ksmd goes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) to sleep.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) pages_unshared: how many pages unique but repeatedly checked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) for merging.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) pages_volatile: how many pages changing too fast to be placed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) in a tree.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) run: write 0 to disable ksm, read 0 while ksm is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - write 1 to run ksm, read 1 while ksm is running.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) - write 2 to disable ksm and unmerge all its pages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) sleep_millisecs: how many milliseconds ksm should sleep between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) scans.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) See Documentation/vm/ksm.rst for more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) What: /sys/kernel/mm/ksm/merge_across_nodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Date: January 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) KernelVersion: 3.9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Contact: Linux memory management mailing list <linux-mm@kvack.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) Description: Control merging pages across different NUMA nodes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) When it is set to 0 only pages from the same node are merged,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) otherwise pages from all nodes can be merged together (default).