kernel-hacking-2024-linux-s.../fs/afs
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
..
afs.h
afs_cm.h
afs_fs.h
afs_vl.h
cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
callback.c
cell.c AFS: Implement an autocell mount capability [ver #2] 2010-08-11 17:11:29 +00:00
cmservice.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
dir.c fs: change d_delete semantics 2011-01-07 17:50:18 +11:00
file.c AFS: Don't put struct file on the stack 2010-05-21 18:31:28 -04:00
flock.c fs/locks.c: prepare for BKL removal 2010-10-05 11:02:04 +02:00
fsclient.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
inode.c AFS: Implement an autocell mount capability [ver #2] 2010-08-11 17:11:29 +00:00
internal.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 2010-08-13 10:37:30 -07:00
Kconfig DNS: Make AFS go to the DNS for AFSDB records for unknown cells 2010-08-05 17:17:51 +00:00
main.c AFS: Fix the module init error handling 2010-08-07 14:23:37 -07:00
Makefile FS-Cache: Make kAFS use FS-Cache 2009-04-03 16:42:41 +01:00
misc.c AFS: Correctly translate auth error aborts and don't failover in such cases 2009-06-16 21:20:14 -07:00
mntpt.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
netdevices.c afs: BUG to BUG_ON changes 2009-04-09 10:41:19 -07:00
proc.c AFS: Implement an autocell mount capability [ver #2] 2010-08-11 17:11:29 +00:00
rxrpc.c afs: destroy work queue on init failure 2010-08-11 08:59:22 -07:00
security.c AFS: Potential null dereference 2010-03-22 09:57:19 -07:00
server.c AFS: Fix possible null pointer dereference in afs_alloc_server() 2010-06-01 09:26:36 -07:00
super.c fs: icache RCU free inodes 2011-01-07 17:50:26 +11:00
vlclient.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vlocation.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vnode.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
volume.c afs: add bdi backing to mount session. 2010-04-22 11:58:18 +02:00
write.c writeback: remove nonblocking/encountered_congestion references 2010-10-26 16:52:05 -07:00