[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1217623796.9016.8.camel@twins>
Date: Fri, 01 Aug 2008 22:49:56 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: David Miller <davem@...emloft.net>, mingo@...e.hu,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org
Subject: Re: [PATCH] lockdep: lock_set_subclass - reset a held lock's
subclass
On Fri, 2008-08-01 at 11:06 -0700, Jeremy Fitzhardinge wrote:
> Peter Zijlstra wrote:
> > From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Subject: lockdep: lock_set_subclass - reset a held lock's subclass
> >
> > this can be used to reset a held lock's subclass, for arbitrary-depth
> > iterated data structures such as trees or lists which have per-node
> > locks.
> >
>
> Hey, can I use this to suppress the spurious lockdep warnings I get when
> I try to hold more than one pte lock at once?
No, you still cannot hold more than 48 locks at any one time, and this
somewhat horrible annotation only works if you don't generate double
classes in the same chain.
What it can do is:
L1
L2
U1
L3
U2
etc..
What you do is:
spin_lock(L1)
spin_lock_nested(L2, 1)
spin_unlock(L1);
lockdep_set_subclass(L2, 0); // because L1, who was 0 isn't there anymore
spin_lock_nested(L3, 1);
spin_unlock(L2);
lockdep_set_subclass(L2, 0); // blah blah..
etc...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists