DragonFly commits List (threaded) for 2009-07
DragonFly-220.127.116.11.gf8565 master sys/vfs/nfs nfs.h nfs_bio.c nfs_iod.c nfs_socket.c nfs_vfsops.c nfsm_subs.c nfsm_subs.h nfsmount.h
Author: Matthew Dillon <firstname.lastname@example.org>
Date: Fri Jul 17 18:25:05 2009 -0700
NFS - Rewrite the RTT code and the request flags & low level state machine
* The RTT code basically did not work with UDP, and never has very well.
Use a somewhat different algorithm and make more of an assumption that
the network is either reliable, or if it isn't reliable that the sysad
is using a reliable protocol (such as TCP).
The new RTT code should do a better job, though there will still
be significant stalling on a lossy network if using UDP (too bad!).
* Replace the congestion control code. Instead of trying to defer
packet transmission to the nfs_timer, which we no longer run at
insane rates, we instead limit the number of async BIOs we allow
to be queued at any given moment.
* Redo the req->r_flags flags and the low level RPC interlocks between
the various consumers and producers. Add additional flags that
can be tested in assertions to validate expectations.
Use R_LOCKED for more then just the nfs_timer code.
* Close a memory hole.
* Hold critical sections to close races that could result in a
thread deadlocking in soreceive waiting for a reply that another
thread already processed.
* Add two sysctls to aid in testing.
vfs.nfs.showrexmit - Causes "X" to be printed on the console whenever
NFS feels that it must retransmit a RPC. Only
occurs with UDP mounts.
vfs.nfs.showrtt - Causes NFS to print out the SRTT, SDRTT, and
converted timeout calculation once a second
while NFS requests are active.
* Increase the asynchronous BIO limits. Because we only need two helper
threads and no longer depend on dozens of synchronous-rpc threads
(the old nfsiod's), there is no practical limit to the number of
requests we can have active.
Reformulate how asynchronous BIOs are accounted for. They are now
accounted for from the moment they are queued to the very end where
they are biodone()'d.
Summary of changes:
sys/vfs/nfs/nfs.h | 32 +++-
sys/vfs/nfs/nfs_bio.c | 11 +-
sys/vfs/nfs/nfs_iod.c | 31 ++-
sys/vfs/nfs/nfs_socket.c | 548 ++++++++++++++++++++++++++--------------------
sys/vfs/nfs/nfs_vfsops.c | 3 +-
sys/vfs/nfs/nfsm_subs.c | 2 -
sys/vfs/nfs/nfsm_subs.h | 2 +-
sys/vfs/nfs/nfsmount.h | 7 +-
8 files changed, 376 insertions(+), 260 deletions(-)
DragonFly BSD source repository