Skip to contentSkip to conversation

rcu: Enable RCU tracepoints by default to aid in debugging

PATCH In review Matt Fleming 2 participants 2 messages Dec 23, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: Enable RCU tracepoints by default to aid in debugging

While debugging a performance issue I needed to understand why RCU sofitrqs were firing so frequently.

Unfortunately, the RCU callback tracepoints are hidden behind CONFIG_RCU_TRACE which defaults to off in the upstream kernel and is likely to also be disabled in enterprise distribution configs.

Enable it by default for CONFIG_TREE_RCU. However, we must keep it disabled for tiny RCU, because it would otherwise pull in a large amount of code that would make tiny RCU less than tiny.

I ran some file system metadata intensive workloads (git checkout, FS-Mark) on a variety of machines with this patch and saw no detectable change in performance.

---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
index a6c8db1d62f6..7fe1ff001792 100644
@@ -1431,6 +1431,7 @@ config RCU_CPU_STALL_TIMEOUT
 config RCU_TRACE
 	bool "Enable tracing for RCU"
 	depends on DEBUG_KERNEL
+	default y if TREE_RCU
 	select TRACE_CLOCK
 	help
 	  This option provides tracing in RCU which presents stats
Signature · 1 line
2.10.0
#1 lore raw
Quoted 11 lines · Matt Fleming

While debugging a performance issue I needed to understand why RCU sofitrqs were firing so frequently.

Unfortunately, the RCU callback tracepoints are hidden behind CONFIG_RCU_TRACE which defaults to off in the upstream kernel and is likely to also be disabled in enterprise distribution configs.

Enable it by default for CONFIG_TREE_RCU. However, we must keep it disabled for tiny RCU, because it would otherwise pull in a large amount of code that would make tiny RCU less than tiny.

Quoted 6 lines

I ran some file system metadata intensive workloads (git checkout, FS-Mark) on a variety of machines with this patch and saw no detectable change in performance.

Queued for testing and review, thank you!

Thanx, Paul

Quoted 19 lines
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
index a6c8db1d62f6..7fe1ff001792 100644
@@ -1431,6 +1431,7 @@ config RCU_CPU_STALL_TIMEOUT
 config RCU_TRACE
 	bool "Enable tracing for RCU"
 	depends on DEBUG_KERNEL
+	default y if TREE_RCU
 	select TRACE_CLOCK
 	help
 	  This option provides tracing in RCU which presents stats
Signature · 1 line
2.10.0