Re: [PATCH 02/17] fs: icache lock s_inodes list

From: Nick Piggin
Date: Sat Oct 16 2010 - 03:54:21 EST


On Fri, Oct 01, 2010 at 01:49:09AM -0400, Christoph Hellwig wrote:
> On Wed, Sep 29, 2010 at 10:18:34PM +1000, Dave Chinner wrote:
> > From: Nick Piggin <npiggin@xxxxxxx>
> >
> > To allow removal of the inode_lock, we first need to protect the
> > superblock inode list with it's own lock instead of using the
> > inode_lock for this purpose. Nest the new sb_inode_list_lock inside
> > the inode_lock around the list operations it needs to protect.
>
> Is there any good reason not to make this lock per-superblock?

Because in the first part of the inode lock series, it is breaking
locks in obvious small steps as possible, by adding global locks
protecting bits of what inode_lock used to.

If we did want to make it per-superblock, that would come at the
last part of the series, where inode_lock is removed and steps are
being taken to improve scalability and locking.

But I don't see why we want to make it per-superblock really anyway.
We want to have scalability within a single superblock, so per CPU
locks are needed. Once we have those, per-superblock doesn't really
buy much.

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