lockdep: Improve implementation of BFS
authorMing Lei <tom.leiming@gmail.com>
Thu, 16 Jul 2009 13:44:29 +0000 (15:44 +0200)
committerPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 24 Jul 2009 08:49:46 +0000 (10:49 +0200)
commitd588e46155e9c51217b9840db1e94a0f594c1af2
tree0ede7d7d8338f8db15d8c690c46a0173196d7bac
parentc94aa5ca3088018d2a7a9bd3258aefffe29df265
lockdep: Improve implementation of BFS

1,replace %MAX_CIRCULAR_QUE_SIZE with &(MAX_CIRCULAR_QUE_SIZE-1)
since we define MAX_CIRCULAR_QUE_SIZE as power of 2;

2,use bitmap to mark if a lock is accessed in BFS in order to
clear it quickly, because we may search a graph many times.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1246201486-7308-3-git-send-email-tom.leiming@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/lockdep.c
kernel/lockdep_internals.h