Messages in this thread | | | Date | Tue, 15 Apr 2008 15:15:32 +0200 | From | "Bart Van Assche" <> | Subject | Re: [PATCH] Replace completions with semaphores |
| |
On Tue, Apr 15, 2008 at 10:44 AM, Peter Zijlstra <peterz@infradead.org> wrote: > Also things like lockdep are a real help to a lot of developers - loads > of locking bugs never make it into the kernel because of it.
I agree that lockdep is a real help for kernel developers. But please keep in mind that locking order checking has its limitations. While locking order checking can detect certain very important classes of deadlocks, it can't detect all classes of possible deadlocks. Consider e.g. the example mentioned by Roland Dreier, where semaphores are used to count the number of elements in a queue. Deadlocks triggered by waiting for a certain semaphore value can't be detected by lockdep-style algorithms. And renaming semaphores into something else won't help.
Bart.
| |