Commit 2a695ca4 authored by Mike Rapoport's avatar Mike Rapoport Committed by Jonathan Corbet

docs/vm: ksm: update stable_node_chains_prune_millisecs description

Make the description of stable_node_chains_prune_millisecs sysfs parameter
less implementation aware and add a few words about this parameter in the
"Design" section.
Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 6570c785
...@@ -150,14 +150,12 @@ max_page_sharing ...@@ -150,14 +150,12 @@ max_page_sharing
traversals are always schedule friendly themselves. traversals are always schedule friendly themselves.
stable_node_chains_prune_millisecs stable_node_chains_prune_millisecs
How frequently to walk the whole list of stable_node "dups" specifies how frequently KSM checks the metadata of the pages
linked in the stable_node "chains" in order to prune stale that hit the deduplication limit for stale information.
stable_nodes. Smaller milllisecs values will free up the KSM Smaller milllisecs values will free up the KSM metadata with
metadata with lower latency, but they will make ksmd use more lower latency, but they will make ksmd use more CPU during the
CPU during the scan. This only applies to the stable_node scan. It's a noop if not a single KSM page hit the
chains so it's a noop if not a single KSM page hit the ``max_page_sharing`` yet.
``max_page_sharing`` yet (there would be no stable_node chains in
such case).
The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``: The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``:
...@@ -249,6 +247,11 @@ deduplication factor at the expense of slower worst case for rmap ...@@ -249,6 +247,11 @@ deduplication factor at the expense of slower worst case for rmap
walks for any KSM page which can happen during swapping, compaction, walks for any KSM page which can happen during swapping, compaction,
NUMA balancing and page migration. NUMA balancing and page migration.
The whole list of stable_node "dups" linked in the stable_node
"chains" is scanned periodically in order to prune stale stable_nodes.
The frequency of such scans is defined by
``stable_node_chains_prune_millisecs`` sysfs tunable.
Reference Reference
--------- ---------
.. kernel-doc:: mm/ksm.c .. kernel-doc:: mm/ksm.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment