freebsd-src/sys/fs/nfs
Alexander Motin d473bac729 Rework NFS Duplicate Request Cache cleanup logic.
- Introduce additional hash to group requests by hash of sockref.  This
allows to process TCP acknowledgements without looping though all the cache,
and as result allows to do it every time.
 - Indroduce additional callbacks to notify application layer about sockets
disconnection.  Without this last few requests processed just before socket
disconnection never processed their ACKs and stuck in cache for many hours.
 - Implement transport-specific method for tracking reply acknowledgements.
New implementation does not cross multiple stack layers to get the data and
does not have race conditions that previously made some requests stuck
in cache.  This could be done more efficiently at sockbuf layer, but that
would broke some KBIs, while I don't know other consumers for it aside NFS.
 - Instead of traversing all DRC twice per request, run cleaning only once
per request, and except in some conditions traverse only single hash slot
at a time.

Together this limits NFS DRC growth only to situations of real connectivity
problems.  If network is working well, and so all replies are acknowledged,
cache remains almost empty even after hours of heavy load.  Without this
change on the same test cache was growing to many thousand requests even
with perfectly working local network.

As another result this reduces CPU time spent on the DRC handling during
SPEC NFS benchmark from about 10% to 0.5%.

Sponsored by:	iXsystems, Inc.
2014-01-03 15:09:59 +00:00
..
nfs.h Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
nfs_commonacl.c
nfs_commonkrpc.c - For kernel compiled only with KDTRACE_HOOKS and not any lock debugging 2013-11-25 07:38:45 +00:00
nfs_commonport.c Revamp the old NFS server's File Handle Affinity (FHA) code so that 2013-04-17 21:00:22 +00:00
nfs_commonsubs.c The NFSv4 client was passing both the p and cred arguments to 2013-12-24 00:48:39 +00:00
nfs_var.h Rework NFS Duplicate Request Cache cleanup logic. 2014-01-03 15:09:59 +00:00
nfscl.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsclstate.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsdport.h Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
nfskpiport.h
nfsm_subs.h Revamp the old NFS server's File Handle Affinity (FHA) code so that 2013-04-17 21:00:22 +00:00
nfsport.h The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
nfsproto.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsrvcache.h Rework NFS Duplicate Request Cache cleanup logic. 2014-01-03 15:09:59 +00:00
nfsrvstate.h
nfsv4_errstr.h
rpcv2.h
xdr_subs.h