From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH 02/17] fs: icache lock s_inodes list Date: Sat, 16 Oct 2010 18:54:11 +1100 Message-ID: <20101016075411.GA19147@amd> References: <1285762729-17928-1-git-send-email-david@fromorbit.com> <1285762729-17928-3-git-send-email-david@fromorbit.com> <20101001054909.GB32349@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Christoph Hellwig Return-path: Content-Disposition: inline In-Reply-To: <20101001054909.GB32349@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 > > > > 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.