Skip to contentSkip to conversation

Kconfig.debug: Set DEBUG_MUTEX to off by default

PATCH In review Tim Chen 2 participants 2 messages Apr 7, 2006 – Apr 8, 2006 Library code

lore
Share & tools
lore

Tim Chen

author
#0 lore raw

PATCH 1/1 Kconfig.debug: Set DEBUG_MUTEX to off by default

Hi,

DEBUG_MUTEX flag is on by default in current kernel configuration.

During performance testing, we saw mutex debug functions like mutex_debug_check_no_locks_freed (called by kfree()) is expensive as it goes through a global list of memory areas with mutex lock and do the checking. For benchmarks such as Volanomark and Hackbench, we have seen more than 40% drop in performance on some platforms. We suggest to set DEBUG_MUTEX off by default. Or at least do that later when we feel that the mutex changes in the current code have stabilized.

Tim Chen

lib/Kconfig.debug +1 -1
@@ -101,7 +101,7 @@ config DEBUG_PREEMPT
 
 config DEBUG_MUTEXES
 	bool "Mutex debugging, deadlock detection"
-	default y
+	default n
 	depends on DEBUG_KERNEL
 	help
 	 This allows mutex semantics violations and mutex related deadlocks
#1 lore raw
Quoted 20 lines · Tim Chen

Hi,

DEBUG_MUTEX flag is on by default in current kernel configuration.

During performance testing, we saw mutex debug functions like mutex_debug_check_no_locks_freed (called by kfree()) is expensive as it goes through a global list of memory areas with mutex lock and do the checking. For benchmarks such as Volanomark and Hackbench, we have seen more than 40% drop in performance on some platforms. We suggest to set DEBUG_MUTEX off by default. Or at least do that later when we feel that the mutex changes in the current code have stabilized.

Tim Chen

lib/Kconfig.debug config DEBUG_PREEMPT · line 104

Quoted 5 lines
lib/Kconfig.debug +1 -1
@@ -101,7 +101,7 @@ config DEBUG_PREEMPT
 
 config DEBUG_MUTEXES
 	bool "Mutex debugging, deadlock detection"
-	default y
+	default n

don't do default n, just remove the line instead ;)