lkml.org 
[lkml]   [2000]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectComprehensive list of locks available?
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.032 / U:5.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site