Vetter: Locking Engineering Principles
Daniel Vetter offers someadvice for developers of locking schemes in the kernel.
Validating locking by hand against all the other locking designsand nesting rules the kernel has overall is nigh impossible,extremely slow, something only few people can do with any chance ofsuccess and hence in almost all cases a complete waste of time. Weneed tools to automate this, and in the Linux kernel this islockdep.Therefore if lockdep doesn't understand your locking design yourdesign is at fault, not lockdep. Adjust accordingly.