diff options
author | Dave Chinner <dchinner@redhat.com> | 2015-03-04 12:37:22 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2015-08-17 18:39:46 -0400 |
commit | 74278da9f70d84d715601fe794567a6d2bfdf078 (patch) | |
tree | 49262a88fc42b85bfe4930f5cd7a832d5ba647c6 /fs/fs-writeback.c | |
parent | cbedaac63481dea52327127a9f1c60f092bd6b07 (diff) | |
download | linux-74278da9f70d84d715601fe794567a6d2bfdf078.tar.gz linux-74278da9f70d84d715601fe794567a6d2bfdf078.tar.bz2 linux-74278da9f70d84d715601fe794567a6d2bfdf078.zip |
inode: convert inode_sb_list_lock to per-sb
The process of reducing contention on per-superblock inode lists
starts with moving the locking to match the per-superblock inode
list. This takes the global lock out of the picture and reduces the
contention problems to within a single filesystem. This doesn't get
rid of contention as the locks still have global CPU scope, but it
does isolate operations on different superblocks form each other.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index d98e37bbf417..f45bf876579f 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2124,7 +2124,7 @@ static void wait_sb_inodes(struct super_block *sb) */ WARN_ON(!rwsem_is_locked(&sb->s_umount)); - spin_lock(&inode_sb_list_lock); + spin_lock(&sb->s_inode_list_lock); /* * Data integrity sync. Must wait for all pages under writeback, @@ -2144,14 +2144,14 @@ static void wait_sb_inodes(struct super_block *sb) } __iget(inode); spin_unlock(&inode->i_lock); - spin_unlock(&inode_sb_list_lock); + spin_unlock(&sb->s_inode_list_lock); /* * We hold a reference to 'inode' so it couldn't have been * removed from s_inodes list while we dropped the - * inode_sb_list_lock. We cannot iput the inode now as we can + * s_inode_list_lock. We cannot iput the inode now as we can * be holding the last reference and we cannot iput it under - * inode_sb_list_lock. So we keep the reference and iput it + * s_inode_list_lock. So we keep the reference and iput it * later. */ iput(old_inode); @@ -2161,9 +2161,9 @@ static void wait_sb_inodes(struct super_block *sb) cond_resched(); - spin_lock(&inode_sb_list_lock); + spin_lock(&sb->s_inode_list_lock); } - spin_unlock(&inode_sb_list_lock); + spin_unlock(&sb->s_inode_list_lock); iput(old_inode); } |