freebsd-skq/sys/fs/nfsserver
mav 31820682b5 MFC r260229, r260258, r260367, r260390, r260459, r260648:
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-22 23:55:25 +00:00
..
nfs_fha_new.c MFC r259765: 2014-01-22 23:48:15 +00:00
nfs_fha_new.h Revamp the old NFS server's File Handle Affinity (FHA) code so that 2013-04-17 21:00:22 +00:00
nfs_nfsdcache.c MFC r260229, r260258, r260367, r260390, r260459, r260648: 2014-01-22 23:55:25 +00:00
nfs_nfsdkrpc.c MFC r260229, r260258, r260367, r260390, r260459, r260648: 2014-01-22 23:55:25 +00:00
nfs_nfsdport.c MFC r260229, r260258, r260367, r260390, r260459, r260648: 2014-01-22 23:55:25 +00:00
nfs_nfsdserv.c Make it possible to force async at server side on new NFS server, similar 2013-01-18 19:42:08 +00:00
nfs_nfsdsocket.c Revamp the old NFS server's File Handle Affinity (FHA) code so that 2013-04-17 21:00:22 +00:00
nfs_nfsdstate.c MFC: r259854 2014-01-01 02:49:45 +00:00
nfs_nfsdsubs.c MFC r260229, r260258, r260367, r260390, r260459, r260648: 2014-01-22 23:55:25 +00:00