]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Remove incorrect backoff code
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 17 Jun 2011 19:35:59 +0000 (20:35 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Jun 2011 16:56:37 +0000 (09:56 -0700)
The ACK packet handling routine contains code which causes the
RTT to backoff if the selective ACK response indicates that there is
a missing packet. The comment justifies this code as being in line
with Phil Karn's work on TCP.

However, the TCP behaviour is that we backoff when we enter resend. Both
TCP and RX have difficulty computing RTTs for resent packets due to the
ambiguous ACK problem. Whilst RX is slightly better than TCP in this
regard, we can't always tell whether an ACK refers to the original, or
resent packet, so resent packets are unable to contribute to the RTT.
This means that if the RTT ends up too low for the connection, and we
start resending every packet, the RTT will never grow to account for
this, as we never feed it any packet samples.

Karn's solution to this was to backoff (double) the RTT value when we
resend a packet, and then to not drop it back down until we receive an
ACK that we can count. This means that we will always get a new sample
for the connection, and the RTT will grow again.

The original author confirms that the current behaviour in RX is
incorrect, so simply remove it with this patchset.

Change-Id: I0f4af56601c43b72394d7903cacc3fc19bc9d046
Reviewed-on: http://gerrit.openafs.org/4860
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/rx/rx.c
src/rx/rx.h

index fa1ba86e1f07573ec464b6043de31a6ae13108aa..5083aac08d8f771f3f7f875dd7bd3952c868e7d8 100644 (file)
@@ -4340,21 +4340,6 @@ rxi_ReceiveAckPacket(struct rx_call *call, struct rx_packet *np,
            missing = 1;
        }
 
-        /*
-         * Following the suggestion of Phil Kern, we back off the peer's
-         * timeout value for future packets until a successful response
-         * is received for an initial transmission.
-         */
-        if (missing && !peer->backedOff) {
-            struct clock c = peer->timeout;
-            struct clock max_to = {3, 0};
-
-            clock_Add(&peer->timeout, &c);
-            if (clock_Gt(&peer->timeout, &max_to))
-                peer->timeout = max_to;
-            peer->backedOff = 1;
-        }
-
        /* If packet isn't yet acked, and it has been transmitted at least
         * once, reset retransmit time using latest timeout
         * ie, this should readjust the retransmit timer for all outstanding
@@ -6831,9 +6816,6 @@ rxi_ComputeRoundTripTime(struct rx_packet *p,
     clock_Zero(&(peer->timeout));
     clock_Addmsec(&(peer->timeout), rtt_timeout);
 
-    /* Reset the backedOff flag since we just computed a new timeout value */
-    peer->backedOff = 0;
-
     dpf(("rxi_ComputeRoundTripTime(call=%d packet=%"AFS_PTR_FMT" rtt=%d ms, srtt=%d ms, rtt_dev=%d ms, timeout=%d.%06d sec)\n",
           p->header.callNumber, p, MSEC(&thisRtt), peer->rtt >> 3, peer->rtt_dev >> 2, (peer->timeout.sec), (peer->timeout.usec)));
 }
index 48e8e3ad7df087a15b5917306229bfbfd8d45e01..1372bcb9917206ade836341355e8c5d269e2f7ec 100644 (file)
@@ -394,7 +394,6 @@ struct rx_peer {
     int rtt;                   /* Smoothed round trip time, measured in milliseconds/8 */
     int rtt_dev;               /* Smoothed rtt mean difference, in milliseconds/4 */
     struct clock timeout;      /* Current retransmission delay */
-    int backedOff;              /* Has the timeout been backed off due to a missing packet? */
     int nSent;                 /* Total number of distinct data packets sent, not including retransmissions */
     int reSends;               /* Total number of retransmissions for this peer, since this structure was created */