Message ID | 20151014134721.GD3816@twins.programming.kicks-ass.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Oct 14, 2015 at 03:47:21PM +0200, Peter Zijlstra wrote: > --- > Documentation/locking/lockdep-design.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/locking/lockdep-design.txt b/Documentation/locking/lockdep-design.txt > index 5001280e9d82..e8e9ad4e6f5e 100644 > --- a/Documentation/locking/lockdep-design.txt > +++ b/Documentation/locking/lockdep-design.txt > @@ -24,6 +24,10 @@ a lock-class is used for the first time after bootup it gets registered, > and all subsequent uses of that lock-class will be attached to this > lock-class. > > +A class is typically associated with a lock's initialisation site; although > +its possible to explicitly initialize a lock with a different class key -- > +such class keys much come from static storage. Now if only I could actually type: s/much/must/
* Peter Zijlstra <peterz@infradead.org> wrote: > On Wed, Oct 14, 2015 at 03:47:21PM +0200, Peter Zijlstra wrote: > > --- > > Documentation/locking/lockdep-design.txt | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/Documentation/locking/lockdep-design.txt b/Documentation/locking/lockdep-design.txt > > index 5001280e9d82..e8e9ad4e6f5e 100644 > > --- a/Documentation/locking/lockdep-design.txt > > +++ b/Documentation/locking/lockdep-design.txt > > @@ -24,6 +24,10 @@ a lock-class is used for the first time after bootup it gets registered, > > and all subsequent uses of that lock-class will be attached to this > > lock-class. > > > > +A class is typically associated with a lock's initialisation site; although > > +its possible to explicitly initialize a lock with a different class key -- > > +such class keys much come from static storage. > > Now if only I could actually type: s/much/must/ also: s/its/it's :-) Thanks, Ingo
On Wed, Oct 14, 2015 at 03:47:21PM +0200, Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 01:36:24PM +0100, Mark Brown wrote: > Does the below work for you? Yes, that's helpful thanks! Reviewed-by: Mark Brown <broonie@kernel.org>
diff --git a/Documentation/locking/lockdep-design.txt b/Documentation/locking/lockdep-design.txt index 5001280e9d82..e8e9ad4e6f5e 100644 --- a/Documentation/locking/lockdep-design.txt +++ b/Documentation/locking/lockdep-design.txt @@ -24,6 +24,10 @@ a lock-class is used for the first time after bootup it gets registered, and all subsequent uses of that lock-class will be attached to this lock-class. +A class is typically associated with a lock's initialisation site; although +its possible to explicitly initialize a lock with a different class key -- +such class keys much come from static storage. + State ----- @@ -165,6 +169,10 @@ partition. The validator treats a lock that is taken in such a nested fashion as a separate (sub)class for the purposes of validation. +Since lock classes are associated with static addresses, the size of struct +lock_class_key determines the amount of sub classes that are possible -- +currently set to 8. + Note: When changing code to use the _nested() primitives, be careful and check really thoroughly that the hierarchy is correctly mapped; otherwise you can get false positives or false negatives.