Document KSM "always" mode kernel cmdline option as well as corresponding sysfs knob. Signed-off-by: Oleksandr Natalenko <oleksandr@xxxxxxxxxx> --- Documentation/admin-guide/kernel-parameters.txt | 7 +++++++ Documentation/admin-guide/mm/ksm.rst | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 2b8ee90bb644..510766a3fa05 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -2008,6 +2008,13 @@ 0: force disabled 1: force enabled + ksm_mode= + [KNL] + Format: [madvise|always] + Default: madvise + Can be used to control the default behavior of the system + with respect to merging anonymous memory. + kvm.ignore_msrs=[KVM] Ignore guest accesses to unhandled MSRs. Default is 0 (don't ignore, but inject #GP) diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst index 9303786632d1..9af730640da7 100644 --- a/Documentation/admin-guide/mm/ksm.rst +++ b/Documentation/admin-guide/mm/ksm.rst @@ -78,6 +78,13 @@ KSM daemon sysfs interface The KSM daemon is controlled by sysfs files in ``/sys/kernel/mm/ksm/``, readable by all but writable only by root: +mode + * set madvise to deduplicate only madvised memory + * set always to allow deduplicating all the anonymous memory + (applies to newly allocated memory only) + + Default: madvise (maintains old behaviour) + pages_to_scan how many pages to scan before ksmd goes to sleep e.g. ``echo 100 > /sys/kernel/mm/ksm/pages_to_scan``. -- 2.21.0