Messages in this thread |  | | Subject | Comprehensive list of locks available? | Date | Mon, 06 Nov 2000 17:14:48 -0800 | From | Rick Lindsley <> |
| |
Now that we've taken to heart the "one lock does not fit all" and we made the kernel increasingly fine-grained with regards to locking, there are many more locks appearing in the code. While Linux does not currently support hierarchical locks, it is still true that the order in which you acquire multiple locks (when needed) can be your first defense against inadvertent deadlock. Knowing how to properly utilize a lock is becoming increasingly important.
Has anybody documented, in total or in part, how the various locks are to be used? A quick scan of the 2.4 source indicates there may be more than 400 non-static spinlocks right now. I've checked the Documentation directory and although there's a little "how-to" from Linus there on how to properly use spinlocks, there does not (yet) appear to be any document on the proper use of specific spinlocks.
I suspect once I start digging that there will undoubtedly be nuggets of information in the comments in the source code. But before I dig too deep, let me make sure I'm not doing unnecessarily redundant work :) Has anybody started on such a document? (Would anybody be willing to contribute to one if I produce and coordinate it?)
Rick - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |