]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Rx: Treat rx_minPeerTimeout not as a minimum but as padding
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 21 Oct 2010 18:13:03 +0000 (14:13 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Oct 2010 02:23:10 +0000 (19:23 -0700)
An improved RTT and timeout calculation algorithm is being
developed but until we have it, treat rx_minPeerTimeout not as
a minimum value for the timeout but as padding to be added to
the measured RTT when computing the peer timeout value.

With this change rx does not begin to send large numbers of
resends when the RTT begins to exceed the rx_minPeerTimeout
value.  Timeout triggered resends at the moment can force rx
into fast recovery mode which in turn kills performance.  It
is better to avoid that problem for now.

Reviewed-on: http://gerrit.openafs.org/3026
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 5c8981e0404287f2aa46390d3a9e8a52261906ab)
Change-Id: I82cf73cc8153d9aba669dc581231a88949b6ec4d
Reviewed-on: http://gerrit.openafs.org/3126
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c

index eeb1a47c3cc8e9ab2e9db3824d863ab636d714ee..b5ed392a15d23d50008fef9ea6fe7786b4773d09 100644 (file)
@@ -6522,11 +6522,11 @@ rxi_ComputeRoundTripTime(struct rx_packet *p,
        peer->rtt = _8THMSEC(rttp) + 8;
        peer->rtt_dev = peer->rtt >> 2; /* rtt/2: they're scaled differently */
     }
-    /* the timeout is RTT + 4*MDEV but no less than rx_minPeerTimeout msec.
+    /* the timeout is RTT + 4*MDEV + rx_minPeerTimeout msec.
      * This is because one end or the other of these connections is usually
      * in a user process, and can be switched and/or swapped out.  So on fast,
      * reliable networks, the timeout would otherwise be too short. */
-    rtt_timeout = MAX(((peer->rtt >> 3) + peer->rtt_dev), rx_minPeerTimeout);
+    rtt_timeout = ((peer->rtt >> 3) + peer->rtt_dev) + rx_minPeerTimeout;
     clock_Zero(&(peer->timeout));
     clock_Addmsec(&(peer->timeout), rtt_timeout);