linux/fs/nilfs2
Nick Piggin fa0d7e3de6 fs: icache RCU free inodes
RCU free the struct inode. This will allow:

- Subsequent store-free path walking patch. The inode must be consulted for
  permissions when walking, so an RCU inode reference is a must.
- sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
  to take i_lock no longer need to take sb_inode_list_lock to walk the list in
  the first place. This will simplify and optimize locking.
- Could remove some nested trylock loops in dcache code
- Could potentially simplify things a bit in VM land. Do not need to take the
  page lock to follow page->mapping.

The downsides of this is the performance cost of using RCU. In a simple
creat/unlink microbenchmark, performance drops by about 10% due to inability to
reuse cache-hot slab objects. As iterations increase and RCU freeing starts
kicking over, this increases to about 20%.

In cases where inode lifetimes are longer (ie. many inodes may be allocated
during the average life span of a single inode), a lot of this cache reuse is
not applicable, so the regression caused by this patch is smaller.

The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
however this adds some complexity to list walking and store-free path walking,
so I prefer to implement this at a later date, if it is shown to be a win in
real situations. I haven't found a regression in any non-micro benchmark so I
doubt it will be a problem.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
2011-01-07 17:50:26 +11:00
..
alloc.c nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
alloc.h nilfs2: add kernel doc comments to persistent object allocator functions 2010-05-10 11:32:31 +09:00
bmap.c nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
bmap.h nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
btnode.c nilfs2: add routines to roll back state of DAT file 2010-10-23 09:24:37 +09:00
btnode.h nilfs2: add read ahead mode to nilfs_btnode_submit_block 2010-07-23 10:02:15 +09:00
btree.c nilfs2: apply read-ahead for nilfs_btree_lookup_contig 2010-07-23 10:02:16 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
cpfile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dat.c nilfs2: fix typo in comment of nilfs_dat_move function 2010-11-24 12:51:48 +09:00
dat.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dir.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-08-10 11:26:52 -07:00
direct.c nilfs2: remove redundant pointer checks in bmap lookup functions 2010-07-23 10:02:14 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
export.h nilfs2: make snapshots in checkpoint tree exportable 2010-10-23 09:24:34 +09:00
file.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
gcinode.c nilfs2: fix regression of garbage collection ioctl 2010-12-16 14:35:18 +09:00
ifile.c nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
ifile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
inode.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
ioctl.c nilfs2: fix regression of garbage collection ioctl 2010-12-16 14:35:18 +09:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
mdt.c nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00
mdt.h nilfs2: remove own inode allocator and destructor for metadata files 2010-10-23 09:24:39 +09:00
namei.c new helper: ihold() 2010-10-25 21:26:11 -04:00
nilfs.h nilfs2: remove own inode allocator and destructor for metadata files 2010-10-23 09:24:39 +09:00
page.c nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
page.h nilfs2: add routines to redirect access to buffers of DAT file 2010-10-23 09:24:37 +09:00
recovery.c nilfs2: get rid of back pointer to writable sb instance 2010-10-23 09:24:38 +09:00
sb.h nilfs2: do not allocate multiple super block instances for a device 2010-10-23 09:24:36 +09:00
segbuf.c nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c mm: add account_page_writeback() 2010-10-26 16:52:06 -07:00
segment.h nilfs2: use root object to get ifile 2010-10-23 09:24:35 +09:00
sufile.c nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
sufile.h nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
super.c fs: icache RCU free inodes 2011-01-07 17:50:26 +11:00
the_nilfs.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 2010-10-23 01:26:47 -07:00
the_nilfs.h nilfs2: get rid of bdi from nilfs object 2010-10-23 09:24:39 +09:00