Skip to contentSkip to conversation

mm: change per-VMA lock statistics to be disabled by default

PATCH Applied Suren Baghdasaryan 4 participants 4 messages Apr 28, 2023 – May 2, 2023

Subsystems (2)
lore
Share & tools
lore

Suren Baghdasaryan

author reviewer
#0 lore raw

PATCH 1/1 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.

Fixes 52f238653e45 ("mm: introduce per-VMA lock statistics")
---
 mm/Kconfig.debug | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
mm/Kconfig.debug +8 -2
index 6dae63b46368..a925415b4d10 100644
@@ -274,6 +274,12 @@ config DEBUG_KMEMLEAK_AUTO_SCAN
 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.
Signature · 1 line
2.40.1.495.gc816e09b53d-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 30 lines · Suren Baghdasaryan

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.

Fixes 52f238653e45 ("mm: introduce per-VMA lock statistics")
---
 mm/Kconfig.debug | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
mm/Kconfig.debug +8 -3
index 6dae63b46368..a925415b4d10 100644
@@ -274,6 +274,12 @@ config DEBUG_KMEMLEAK_AUTO_SCAN
 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.
--
Quoted 2 lines

2.40.1.495.gc816e09b53d-goog

Acked-by on v1 1/1
#2 lore raw
In reply to Suren Baghdasaryan
Quoted 6 lines · Suren Baghdasaryan

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.

Fixes 52f238653e45 ("mm: introduce per-VMA lock statistics")
Quoted 23 lines
---
 mm/Kconfig.debug | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
mm/Kconfig.debug +8 -2
index 6dae63b46368..a925415b4d10 100644
@@ -274,6 +274,12 @@ config DEBUG_KMEMLEAK_AUTO_SCAN
 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.
Reviewed-by on v1 1/1
#3 lore raw
In reply to Suren Baghdasaryan
Quoted 19 lines · Suren Baghdasaryan

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.

Fixes 52f238653e45 ("mm: introduce per-VMA lock statistics")
---
  mm/Kconfig.debug | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
mm/Kconfig.debug +0 -1
index 6dae63b46368..a925415b4d10 100644
@@ -274,6 +274,12 @@ config DEBUG_KMEMLEAK_AUTO_SCAN
  config PER_VMA_LOCK_STATS
  	bool "Statistics for per-vma locks"
  	depends on PER_VMA_LOCK
-	default y

mm/Kconfig.debug config DEBUG_KMEMLEAK_AUTO_SCAN · line 285

Quoted 10 lines
mm/Kconfig.debug +8 -1
  	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.
Signature · 3 lines
Thanks,

David / dhildenb