Skip to contentSkip to conversation

lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too

PATCH New Ingo Molnar 1 participant 1 message Dec 7, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too

Subject: [patch] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too
From: Ingo Molnar <[email protected]>

CONFIG_DEBUG_LOCKDEP is unacceptably slow because it does not utilize the chain-hash. Turn the chain-hash back on in this case too.

---
 kernel/lockdep.c |    8 --------
 1 file changed, 8 deletions(-)
kernel/lockdep.c +0 -8
Index: linux/kernel/lockdep.c
===================================================================
@@ -1278,14 +1278,6 @@ static inline int lookup_chain_cache(u64
 		if (chain->chain_key == chain_key) {
 cache_hit:
 			debug_atomic_inc(&chain_lookup_hits);
-			/*
-			 * In the debugging case, force redundant checking
-			 * by returning 1:
-			 */
-#ifdef CONFIG_DEBUG_LOCKDEP
-			__raw_spin_lock(&hash_lock);
-			return 1;
-#endif
 			if (very_verbose(class))
 				printk("\nhash chain already cached, key: %016Lx tail class: [%p] %s\n", chain_key, class->key, class->name);
 			return 0;