linux/net/sunrpc
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
..
auth_gss Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
xprtrdma sunrpc/xprtrdma: clean up workqueue usage 2010-10-21 10:11:45 -04:00
addr.c
auth_generic.c sunrpc: fix up rpcauth_remove_module section mismatch 2010-09-29 12:27:37 -04:00
auth_null.c SUNRPC: Move the bound cred to struct rpc_rqst 2010-08-04 08:54:09 -04:00
auth_unix.c SUNRPC: Move the bound cred to struct rpc_rqst 2010-08-04 08:54:09 -04:00
auth.c Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
backchannel_rqst.c
bc_svc.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-04-11 14:53:53 -07:00
cache.c Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
clnt.c SUNRPC: Fix an infinite loop in call_refresh/call_refreshresult 2010-11-22 13:22:39 -05:00
Kconfig nfsd4: remove spkm3 2010-10-01 18:09:55 -04:00
Makefile
netns.h sunrpc: Make the ip_map_cache be per-net 2010-09-27 10:16:12 -04:00
rpc_pipe.c fs: icache RCU free inodes 2011-01-07 17:50:26 +11:00
rpcb_clnt.c Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00
sched.c Merge branch 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 2010-10-25 13:48:29 -07:00
socklib.c
stats.c SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable 2010-11-16 11:58:51 -05:00
sunrpc_syms.c sunrpc: Make the ip_map_cache be per-net 2010-09-27 10:16:12 -04:00
sunrpc.h
svc_xprt.c sunrpc: prevent use-after-free on clearing XPT_BUSY 2010-12-07 20:39:55 -05:00
svc.c sunrpc: close connection when a request is irretrievably lost. 2010-09-21 16:57:49 -04:00
svcauth_unix.c sunrpc: Use helper to set v4 mapped addr in ip_map_parse 2010-10-11 20:00:17 -04:00
svcauth.c
svcsock.c svcrpc: svc_tcp_sendto XPT_DEAD check is redundant 2010-10-25 17:59:34 -04:00
sysctl.c
timer.c
xdr.c SUNRPC: Add a helper function xdr_inline_peek 2010-10-23 15:27:32 -04:00
xprt.c sunrpc: Turn list_for_each-s into the ..._entry-s 2010-10-19 10:48:16 -04:00
xprtsock.c Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux 2010-10-26 09:55:25 -07:00