Re: [patch 11/33] fs: dcache scale subdirs

From: Peter Zijlstra
Date: Wed Jun 23 2010 - 03:23:28 EST


On Tue, 2010-06-22 at 19:03 -0700, john stultz wrote:

> > Well, you make lockdep very unhappy by locking multiple dentries
> > (unbounded number) all in the same lock class.
>
> So.. Is there a way to tell lockdep that the nesting is ok (I thought
> that was what the spin_lock_nested call was doing...)?

spin_lock_nested() allows you to nest a limited number of locks (up to
8, although the usual case is 1).

> Or is locking a (possibly quite long) chain of objects really just a
> do-not-do type of operation?

Usually, yeah. It would be really nice to do this another way (also for
scalability, keeping a large subtree locked is bound to to lead to more
contention).
--
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/