From 78c6875e2fd149c875eddde0c6ddd648ff338d21 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Fri, 28 Apr 2023 10:35:33 -0700 Subject: [PATCH] UPSTREAM: mm: change per-VMA lock statistics to be disabled by default Change CONFIG_PER_VMA_LOCK_STATS to be disabled by default, as most users don't need it. Add configuration help to clarify its usage. Link: https://lkml.kernel.org/r/20230428173533.18158-1-surenb@google.com Fixes: 52f238653e45 ("mm: introduce per-VMA lock statistics") Signed-off-by: Suren Baghdasaryan Suggested-by: Linus Torvalds Reviewed-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton (cherry picked from commit 6152e53d9671b0ccc21c1bca842617b32ccfc5d8) Bug: 161210518 Change-Id: Ibd57999a415b5433ae3b99365ea50526a35452d1 Signed-off-by: Suren Baghdasaryan --- mm/Kconfig.debug | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index 7b77d94a1b77..5090ac381d80 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -227,6 +227,12 @@ config PTDUMP_DEBUGFS config PER_VMA_LOCK_STATS bool "Statistics for per-vma locks" depends on PER_VMA_LOCK - default y help - Statistics for per-vma locks. + Say Y here to enable success, retry and failure counters of page + faults handled under protection of per-vma locks. When enabled, the + counters are exposed in /proc/vmstat. This information is useful for + kernel developers to evaluate effectiveness of per-vma locks and to + identify pathological cases. Counting these events introduces a small + overhead in the page fault path. + + If in doubt, say N.