linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* vfs: inode lock breakup
@ 2011-03-22 11:23 Dave Chinner
  2011-03-22 11:23 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Dave Chinner @ 2011-03-22 11:23 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel, linux-fsdevel

Hi Al,

The following patches are the inode_lock breakup series originally
derived from Nick Piggin's vfs-scale tree. I've kind of been sitting
on them until the dcache_lock breakup and rcu path-walk has had some
time to be shaken out. The patch ѕet is pretty much unchanged from
the last round of review last last year - all I've done to bring it
up to date is forward port it and run it through some testing on XFS
and ext4.

I know it's late in the .39 merge window, but I hope you'll consider
it if the patches are still acceptable(*). Otherwise I'm happy to take
the time to get it right for .40.

Cheers,

Dave.

(*) The series can also be found here:

  git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev.git inode-scale

Dave Chinner (8):
      fs: protect inode->i_state with inode->i_lock
      fs: factor inode disposal
      fs: Lock the inode LRU list separately
      fs: remove inode_lock from iput_final and prune_icache
      fs: move i_sb_list out from under inode_lock
      fs: move i_wb_list out from under inode_lock
      fs: rename inode_lock to inode_hash_lock
      fs: pull inode->i_lock up out of writeback_single_inode

 Documentation/filesystems/Locking |    2 +-
 Documentation/filesystems/porting |   16 +-
 Documentation/filesystems/vfs.txt |    2 +-
 fs/block_dev.c                    |    6 +-
 fs/buffer.c                       |    2 +-
 fs/drop_caches.c                  |   18 +-
 fs/fs-writeback.c                 |  141 ++++++++-----
 fs/inode.c                        |  416 +++++++++++++++++++++----------------
 fs/internal.h                     |    7 +
 fs/logfs/inode.c                  |    2 +-
 fs/notify/inode_mark.c            |   42 +++--
 fs/notify/mark.c                  |    1 -
 fs/notify/vfsmount_mark.c         |    1 -
 fs/ntfs/inode.c                   |    4 +-
 fs/quota/dquot.c                  |   41 ++--
 include/linux/fs.h                |    2 +-
 include/linux/quotaops.h          |    2 +-
 include/linux/writeback.h         |    2 +-
 mm/backing-dev.c                  |    8 +-
 mm/filemap.c                      |   10 +-
 mm/rmap.c                         |    5 +-
 21 files changed, 434 insertions(+), 296 deletions(-)


^ permalink raw reply	[flat|nested] 17+ messages in thread
* fs: break out inode operations from inode_lock V4
@ 2010-10-29  8:59 Dave Chinner
  2010-10-29  8:59 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
  0 siblings, 1 reply; 17+ messages in thread
From: Dave Chinner @ 2010-10-29  8:59 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel

Hi Al,

Another update to the inode_lock splitting patch set. It's still
based on your merge-stem branch. I'm going to be out all weekend, so
any further changes will take a couple of days to turn around.

Version 4:
- whitespace cleanup
- moved setting state on new inodes till after the hash search fails
  in insert_inode_locked
- made hash insert operations atomic with state changes by holding
  inode->i_lock while doing hash inserts
- made inode hash removals atomic with state changes by taking the
  inode_lock (later inode_hash_lock) and inode->i_lock. Combined
  with the insert changes, this means the inode_unhashed check in
  ->drop_inode is safely protected by just holding the
  inode->i_lock.
- protect inode_unhashed() checks in insert_inode_locked with
  inode->i_lock
- cleaned up comments and documentation a bit more.


Version 3:
- remove up wake_up_inode() inode_lock avoidance optimisation as the
  inode_lock is no longer protecting i_state.
- Added a BUG_ON() check to evict() to ensure that inodes are removed
  from the LRU before being evicted.
- removed inode_lock from igrab() when removing inode_lock from the
  first half of iput_final()
- added 3 patches to convert the per-sb inode list, the writeback lists and the
  inode hashes under their own locks. The changes from the first version of
  these patches (posted separately) are:
	- cleaned up comment for writeback_single_inode()
	- dropped __mark_inode_dirty() cleanup and just moved the minimum
	  amount of code around to handle the locking changes cleanly.
	- moved adding inodes to sb list under the hash lock as well so we
	  don't have inodes that are not on the per-sb lists on the hash.
- added a patch to clean up inode_lock references in documentation and
  comments.

Version 2:
- make i_state checks/__iget() atomic under inode->i_lock
- merge dispose_one_inode() into evict()
- move inode hash removal after ->evict_inode call.
- always take the inode_lru_lock() when checking whether the inode
  is on the lru or not.

^ permalink raw reply	[flat|nested] 17+ messages in thread
* fs: break out inode operations from inode_lock V3
@ 2010-10-29  3:23 Dave Chinner
  2010-10-29  3:23 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
  0 siblings, 1 reply; 17+ messages in thread
From: Dave Chinner @ 2010-10-29  3:23 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel

Hi Al,

This series is a merge of the two previous sets of patches that
broke the inode LRU operations and the first half of iput_final()
out from under the inode_lock and then split the lists under
separate locks.  The patches should apply to your current merge-stem
tree. I can rebase it on a different tree if you want.

Version 3:
- remove up wake_up_inode() inode_lock avoidance optimisation as the
  inode_lock is no longer protecting i_state.
- Added a BUG_ON() check to evict() to ensure that inodes are removed
  from the LRU before being evicted.
- removed inode_lock from igrab() when removing inode_lock from the
  first half of iput_final()
- added 3 patches to convert the per-sb inode list, the writeback lists and the
  inode hashes under their own locks. The changes from the first version of
  these patches (posted separately) are:
	- cleaned up comment for writeback_single_inode()
	- dropped __mark_inode_dirty() cleanup and just moved the minimum
	  amount of code around to handle the locking changes cleanly.
	- moved adding inodes to sb list under the hash lock as well so we
	  don't have inodes that are not on the per-sb lists on the hash.
- added a patch to clean up inode_lock references in documentation and
  comments.

Version 2:
- make i_state checks/__iget() atomic under inode->i_lock
- merge dispose_one_inode() into evict()
- move inode hash removal after ->evict_inode call.
- always take the inode_lru_lock() when checking whether the inode
  is on the lru or not.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-03-23 23:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-22 11:23 vfs: inode lock breakup Dave Chinner
2011-03-22 11:23 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
2011-03-22 11:23 ` [PATCH 2/8] fs: factor inode disposal Dave Chinner
2011-03-22 11:23 ` [PATCH 3/8] fs: Lock the inode LRU list separately Dave Chinner
2011-03-22 11:23 ` [PATCH 4/8] fs: remove inode_lock from iput_final and prune_icache Dave Chinner
2011-03-22 11:23 ` [PATCH 5/8] fs: move i_sb_list out from under inode_lock Dave Chinner
2011-03-22 11:23 ` [PATCH 6/8] fs: move i_wb_list " Dave Chinner
2011-03-22 11:23 ` [PATCH 7/8] fs: rename inode_lock to inode_hash_lock Dave Chinner
2011-03-22 11:23 ` [PATCH 8/8] fs: pull inode->i_lock up out of writeback_single_inode Dave Chinner
2011-03-22 18:17 ` vfs: inode lock breakup Sedat Dilek
2011-03-23  6:29   ` Dave Chinner
2011-03-23  7:53     ` Sedat Dilek
2011-03-23 23:36       ` Dave Chinner
2011-03-23 19:03 ` [PATCH 9/8] fs: simplify iget & friends Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2010-10-29  8:59 fs: break out inode operations from inode_lock V4 Dave Chinner
2010-10-29  8:59 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
2010-10-29  3:23 fs: break out inode operations from inode_lock V3 Dave Chinner
2010-10-29  3:23 ` [PATCH 1/8] fs: protect inode->i_state with inode->i_lock Dave Chinner
2010-10-29  4:29   ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).