kernel-fxtec-pro1x/fs/lockd
Chuck Lever 8ea6ecc8b0 lockd: Create client-side nlm_host cache
NFS clients don't need the garbage collection processing that is
performed on nlm_host structures.  The client picks up an nlm_host at
mount time and holds a reference to it until the file system is
unmounted.

Servers, on the other hand, don't have a precise way to tell when an
nlm_host is no longer being used, so zero refcount nlm_host entries
are left to expire in the cache after a time.

Basically there's nothing holding a reference to an nlm_host between
individual server-side NLM requests, but we can't afford the expense
of recreating them for every new NLM request from a client.  The
nlm_host cache adds some lifetime hysteresis to entries in the cache
so the next time a particular nlm_host is needed, it's likely to be
discovered by a lookup rather than created from whole cloth.

With the new implementation, client nlm_host cache items are no longer
garbage collected, and are destroyed directly by a new release
function specialized for client entries, nlmclnt_release_host().  They
are cached in their own data structure, and have their own lookup
logic, simplified and specialized for client nlm_host entries.

However, the client nlm_host cache still shares reboot recovery logic
with the server nlm_host cache.  The NSM "peer rebooted" downcall for
clients and servers still come through the same RPC call.  This is a
legacy formal API that would be difficult to alter, and besides, the
user space NSM implementation can't tell the difference between peers
that are clients or servers.

For this reason, the client cache continues to share the
nlm_host_mutex (and reboot recovery logic) with the server cache.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2010-12-16 12:37:26 -05:00
..
clnt4xdr.c SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
clntlock.c lockd: Create client-side nlm_host cache 2010-12-16 12:37:26 -05:00
clntproc.c lockd: Create client-side nlm_host cache 2010-12-16 12:37:26 -05:00
clntxdr.c SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
grace.c nfsd: common grace period control 2008-10-03 16:19:02 -04:00
host.c lockd: Create client-side nlm_host cache 2010-12-16 12:37:26 -05:00
Makefile lockd: Introduce new-style XDR functions for NLMv4 2010-12-16 12:37:23 -05:00
mon.c SUNRPC: New xdr_streams XDR decoder API 2010-12-16 12:37:25 -05:00
svc.c lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
svc4proc.c lockd: Split nlm_release_call() 2010-12-16 12:37:26 -05:00
svclock.c lockd: Split nlm_release_call() 2010-12-16 12:37:26 -05:00
svcproc.c lockd: Split nlm_release_call() 2010-12-16 12:37:26 -05:00
svcshare.c lockd: fix sparse warning in svcshare.c 2008-04-23 16:13:39 -04:00
svcsubs.c lockd: push lock_flocks down 2010-10-27 21:39:39 +02:00
xdr.c lockd: Move nlmdbg_cookie2a() to svclock.c 2010-12-16 12:37:24 -05:00
xdr4.c lockd: Introduce new-style XDR functions for NLMv4 2010-12-16 12:37:23 -05:00