]> err.no Git - linux-2.6/commitdiff
[PATCH] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too
authorIngo Molnar <mingo@elte.hu>
Wed, 13 Dec 2006 08:34:42 +0000 (00:34 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 13 Dec 2006 17:05:50 +0000 (09:05 -0800)
CONFIG_DEBUG_LOCKDEP is unacceptably slow because it does not utilize
the chain-hash. Turn the chain-hash back on in this case too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/lockdep.c

index c4ffd3c1dec43b62c5bf49766c4c6c83d1008d70..69e92c6b04724ad3780f8df7efe20824ee2122e1 100644 (file)
@@ -1276,14 +1276,6 @@ static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class)
                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;