summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs.h
diff options
context:
space:
mode:
authorcel <cel@FreeBSD.org>2006-05-23 18:33:58 +0000
committercel <cel@FreeBSD.org>2006-05-23 18:33:58 +0000
commitec80996e6b2ebfba48c19d243ad3fd4f810cd75c (patch)
tree8e9eadb2175472785f8fc6b2f9477037efeed9f7 /sys/nfsclient/nfs.h
parent04be51fc90e96399fdb0fbc4352ca5b7b52e4ad6 (diff)
downloadFreeBSD-src-ec80996e6b2ebfba48c19d243ad3fd4f810cd75c.zip
FreeBSD-src-ec80996e6b2ebfba48c19d243ad3fd4f810cd75c.tar.gz
Refactor the NFS over UDP retransmit timeout estimation logic to allow
the estimator to be more easily tuned and maintained. There should be no functional change except there is now a lower limit on the retransmit timeout to prevent the client from retransmitting faster than the server's disks can fill requests, and an upper limit to prevent the estimator from taking to long to retransmit during a server outage. Reviewed by: mohan, kris, silby Sponsored by: Network Appliance, Incorporated
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r--sys/nfsclient/nfs.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h
index c3c54b2..9dc34a7 100644
--- a/sys/nfsclient/nfs.h
+++ b/sys/nfsclient/nfs.h
@@ -257,6 +257,31 @@ extern int nfs_debug;
#endif
+/*
+ * On fast networks, the estimator will try to reduce the
+ * timeout lower than the latency of the server's disks,
+ * which results in too many timeouts, so cap the lower
+ * bound.
+ */
+#define NFS_MINRTO (NFS_HZ >> 2)
+
+/*
+ * Keep the RTO from increasing to unreasonably large values
+ * when a server is not responding.
+ */
+#define NFS_MAXRTO (20 * NFS_HZ)
+
+enum nfs_rto_timer_t {
+ NFS_DEFAULT_TIMER,
+ NFS_GETATTR_TIMER,
+ NFS_LOOKUP_TIMER,
+ NFS_READ_TIMER,
+ NFS_WRITE_TIMER,
+};
+#define NFS_MAX_TIMER (NFS_WRITE_TIMER)
+
+#define NFS_INITRTT (NFS_HZ << 3)
+
vfs_init_t nfs_init;
vfs_uninit_t nfs_uninit;
int nfs_mountroot(struct mount *mp, struct thread *td);
OpenPOWER on IntegriCloud