]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r260229, r260258, r260367, r260390, r260459, r260648:
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 22 Jan 2014 23:55:25 +0000 (23:55 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 22 Jan 2014 23:55:25 +0000 (23:55 +0000)
commitca44e94f59d982a45541b7f79e297b20a20b21a3
tree072242ab1e702c0ab5321cf6d0b8c69e85b20fba
parent7bb4da3f66819c20dbc53679e1cad762dfbf545b
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@261055 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfs/nfs_var.h
sys/fs/nfs/nfsrvcache.h
sys/fs/nfsserver/nfs_nfsdcache.c
sys/fs/nfsserver/nfs_nfsdkrpc.c
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdsubs.c
sys/rpc/svc.c
sys/rpc/svc.h
sys/rpc/svc_dg.c
sys/rpc/svc_vc.c