diff mbox series

[v1,3/4] mm/ksm: document smart scan mode

Message ID 20230912175228.952039-4-shr@devkernel.io (mailing list archive)
State New
Headers show
Series Smart scanning mode for KSM | expand

Commit Message

Stefan Roesch Sept. 12, 2023, 5:52 p.m. UTC
This adds documentation for the smart scan mode of KSM.

Signed-off-by: Stefan Roesch <shr@devkernel.io>
---
 Documentation/admin-guide/mm/ksm.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

David Hildenbrand Sept. 18, 2023, 11:28 a.m. UTC | #1
On 12.09.23 19:52, Stefan Roesch wrote:
> This adds documentation for the smart scan mode of KSM.
> 
> Signed-off-by: Stefan Roesch <shr@devkernel.io>
> ---
>   Documentation/admin-guide/mm/ksm.rst | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst
> index 776f244bdae4..1762219baf51 100644
> --- a/Documentation/admin-guide/mm/ksm.rst
> +++ b/Documentation/admin-guide/mm/ksm.rst
> @@ -155,6 +155,15 @@ stable_node_chains_prune_millisecs
>           scan. It's a noop if not a single KSM page hit the
>           ``max_page_sharing`` yet.
>   
> +smart_scan
> +        By default KSM checks every candidate page for each scan. It does
> +        not take into account historic information. When smart scan is
> +        enabled, pages that have previously not been de-duplicated get
> +        skipped. How often these pages are skipped depends on how often
> +        de-duplication has already been tried and failed. By default this
> +        optimization is disabled. The ``pages_skipped`` metric shows how
> +        effetive the setting is.
> +
>   The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``:
>   
>   general_profit

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/Documentation/admin-guide/mm/ksm.rst b/Documentation/admin-guide/mm/ksm.rst
index 776f244bdae4..1762219baf51 100644
--- a/Documentation/admin-guide/mm/ksm.rst
+++ b/Documentation/admin-guide/mm/ksm.rst
@@ -155,6 +155,15 @@  stable_node_chains_prune_millisecs
         scan. It's a noop if not a single KSM page hit the
         ``max_page_sharing`` yet.
 
+smart_scan
+        By default KSM checks every candidate page for each scan. It does
+        not take into account historic information. When smart scan is
+        enabled, pages that have previously not been de-duplicated get
+        skipped. How often these pages are skipped depends on how often
+        de-duplication has already been tried and failed. By default this
+        optimization is disabled. The ``pages_skipped`` metric shows how
+        effetive the setting is.
+
 The effectiveness of KSM and MADV_MERGEABLE is shown in ``/sys/kernel/mm/ksm/``:
 
 general_profit