summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-10-27 09:44:52 +0100
committerIngo Molnar <mingo@kernel.org>2025-11-04 08:32:41 +0100
commit5412910487d0839111e4f2f3a6f33f6c9af9b007 (patch)
tree18e9a4a48326a87bb60f2457edadb82d6ae220df /init
parentdab344753e021fe84c24f9d8b0b63cb5bcf463d7 (diff)
rseq: Expose lightweight statistics in debugfs
Analyzing the call frequency without actually using tracing is helpful for analysis of this infrastructure. The overhead is minimal as it just increments a per CPU counter associated to each operation. The debugfs readout provides a racy sum of all counters. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/20251027084307.027916598@linutronix.de
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index cab3ad28ca49..f39fdfb28797 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1913,6 +1913,18 @@ config RSEQ
If unsure, say Y.
+config RSEQ_STATS
+ default n
+ bool "Enable lightweight statistics of restartable sequences" if EXPERT
+ depends on RSEQ && DEBUG_FS
+ help
+ Enable lightweight counters which expose information about the
+ frequency of RSEQ operations via debugfs. Mostly interesting for
+ kernel debugging or performance analysis. While lightweight it's
+ still adding code into the user/kernel mode transitions.
+
+ If unsure, say N.
+
config DEBUG_RSEQ
default n
bool "Enable debugging of rseq() system call" if EXPERT