Re: [rfc] scale dcache locking

From: Nick Piggin
Date: Thu Apr 02 2009 - 05:43:54 EST


On Wed, Apr 01, 2009 at 03:23:12PM +0100, Al Viro wrote:
> On Mon, Mar 30, 2009 at 02:55:39AM +1100, npiggin@xxxxxxx wrote:
> > This is my sketch for improving dcache locking scalability. So far I've
> > only really been looking at core code to get an idea of how it might look,
> > so most configurable functionality is broken (and unfortunately it might
> > well be something in there which will cause a fundamental problem for me).
>
> Umm... Some of that makes obvious sense per se, some... In particular,
> all of a sudden we get contention between multiple dput() on the same
> dentry, which is dirt-common for directory ones.

Yes that's true but I'm hoping lock hold times on d_lock aren't
too long, in which case the major cost should remain just the
cacheline contention.

Hmm, I wanted to avoid the atomic because it tends to be covered
by d_lock a lot of the time anyway so avoiding the extra locked op,
and also makes concurrency a bit easier to think about.

In worst case, I guess we need to reintroduce atomic refcount or
have another lock for it...

--
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/