Re: Lockdep warning for iprune_mutex at shrink_icache_memory

From: Ingo Molnar
Date: Thu Dec 04 2008 - 04:09:47 EST



* Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> On Thu, 2008-11-27 at 09:05 +0100, Peter Zijlstra wrote:
> > On Thu, 2008-11-27 at 08:34 +1100, Dave Chinner wrote:
> > > Is changing the lock class dynamically possible/allowed?
> >
> > Currently, no, but I'll see what I can do, it requires a bit of trickery
> > to make that happen..
> >
> > I'll let you know when I've sorted that out.
>
> Ok, that wasn't hard at all..
>
> Dave, Christoph, can you have a play with this and post this patch along
> with a potential user - I think it best if we don't merge this without
> at least one user in tree :-)
>
> ---
> Subject: lockdep: change a held lock's class
> From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Date: Thu Dec 04 08:34:56 CET 2008
>
> Impact: introduce new lockdep API
>
> Allow to change a held lock's class. Basically the same as the existing
> code to change a subclass therefore reuse all that.
>
> The XFS code will be able to use this to annotate their inode locking.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
> ---
> include/linux/lockdep.h | 12 ++++++++++--
> kernel/lockdep.c | 24 +++++++++---------------
> 2 files changed, 19 insertions(+), 17 deletions(-)

i've applied it to tip/core/locking, but it's just a new API without
really disturbing the current code - but it would be nice to know whether
it solves the XFS annotation problems.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/