diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-10-23 08:01:02 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-11-07 16:56:11 -0500 |
commit | 5b095e99928cc13332d364f7cca7a9ca684369b4 (patch) | |
tree | 9e0c06472028d1caa9d9a36d297741a5edf7cf79 /Makefile | |
parent | b0cb9085239a20b7482ddd4839dd1d5476801dfa (diff) |
nfsd: convert nfs4_file searches to use RCU
The global state_lock protects the file_hashtbl, and that has the
potential to be a scalability bottleneck.
Address this by making the file_hashtbl use RCU. Add a rcu_head to the
nfs4_file and use that when freeing ones that have been hashed. In order
to conserve space, we union the fi_rcu field with the fi_delegations
list_head which must be clear by the time the last reference to the file
is dropped.
Convert find_file_locked to use RCU lookup primitives and not to require
that the state_lock be held, and convert find_file to do a lockless
lookup. Convert find_or_add_file to attempt a lockless lookup first, and
then fall back to doing a locked search and insert if that fails to find
anything.
Also, minimize the number of times we need to calculate the hash value
by passing it in as an argument to the search and insert functions, and
optimize the order of arguments in nfsd4_init_file.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions