diff options
author | mav <mav@FreeBSD.org> | 2014-01-03 15:09:59 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-01-03 15:09:59 +0000 |
commit | d75fe782e9f66e5daa9ee5ad39eecc2be925db47 (patch) | |
tree | 41fae690ab667a8b53a31423d51d2ff36ca697a6 /sys/fs/nfs/nfs.h | |
parent | 4d725b0decffd3025cc73d299156cafb82885d99 (diff) | |
download | FreeBSD-src-d75fe782e9f66e5daa9ee5ad39eecc2be925db47.zip FreeBSD-src-d75fe782e9f66e5daa9ee5ad39eecc2be925db47.tar.gz |
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.
Diffstat (limited to 'sys/fs/nfs/nfs.h')
0 files changed, 0 insertions, 0 deletions