]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Make rx_softAckDelay & rx_lastAckDelay private
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 17 Jun 2011 18:12:09 +0000 (19:12 +0100)
committerDerrick Brashear <shadow@dementia.org>
Thu, 7 Jul 2011 12:18:55 +0000 (05:18 -0700)
The values of these two parameters directly affect the modifiers
that are needed in the peer's RTT calculations, and so can not
arbitrarily be changed by applications.

lastAckDelay has been 400ms since the first OpenAFS release, and
that value is used as a modifier when computing the timeout of the
last packet. It is likely that any change which made this value
longer than 400ms would have detrimental effects on deployed clients

softAckDelay has been 100ms for a similar time period. We have
chopped and changed the value of minPeerTimeout, so it is unclear
what the maximal value for this parameter is. For much of OpenAFS's
life, minPeerTimeout was a 350ms padding value, which suggests that
copying TCP, and setting the maximal value at 200ms would be a safe
option. For now, however, leave it at 100ms to avoid unexpected
side effects.

hardAckDelay is not addressed by this patch set, as all ACK packets
sent from the application thread are marked as delayed, and so
currently have no part in computing RTT times. It is likely, however,
that any changes to the hard ACK timeout should be very carefully
considered.

Reviewed-on: http://gerrit.openafs.org/4858
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec)

Change-Id: I7976d8d11007c0f597ede707db7cbb617956bd29
Reviewed-on: http://gerrit.openafs.org/4909
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c
src/rx/rx_globals.h

index 13b2243dbe7575fbd15dd3d876865df435b4b699..d04670b6f6399330884e876aba552f32b06fff08 100644 (file)
@@ -140,6 +140,25 @@ struct rx_tq_debug {
 } rx_tq_debug;
 #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
 
+/* Constant delay time before sending an acknowledge of the last packet
+ * received.  This is to avoid sending an extra acknowledge when the
+ * client is about to make another call, anyway, or the server is
+ * about to respond.
+ *
+ * The lastAckDelay may not exceeed 400ms without causing peers to
+ * unecessarily timeout.
+ */
+struct clock rx_lastAckDelay = {0, 400000};
+
+/* Constant delay time before sending a soft ack when none was requested.
+ * This is to make sure we send soft acks before the sender times out,
+ * Normally we wait and send a hard ack when the receiver consumes the packet
+ *
+ * This value has been 100ms in all shipping versions of OpenAFS. Changing it
+ * will require changes to the peer's RTT calculations.
+ */
+struct clock rx_softAckDelay = {0, 100000};
+
 /*
  * rxi_rpc_peer_stat_cnt counts the total number of peer stat structures
  * currently allocated within rx.  This number is used to allocate the
@@ -587,12 +606,8 @@ rx_InitHost(u_int host, u_int port)
     rx_connHashTable = (struct rx_connection **)htable;
     rx_peerHashTable = (struct rx_peer **)ptable;
 
-    rx_lastAckDelay.sec = 0;
-    rx_lastAckDelay.usec = 400000;     /* 400 milliseconds */
     rx_hardAckDelay.sec = 0;
     rx_hardAckDelay.usec = 100000;     /* 100 milliseconds */
-    rx_softAckDelay.sec = 0;
-    rx_softAckDelay.usec = 100000;     /* 100 milliseconds */
 
     rxevent_Init(20, rxi_ReScheduleEvents);
 
index 1069eb5829b8f57a6cd5cb609195d1e446b797e0..c4c82996477aab95d8b89d0b44d07faf74ff6306 100644 (file)
@@ -49,9 +49,6 @@ EXT struct rx_queue rx_incomingCallQueue;
 /* Server processes wait on this queue when there are no appropriate calls to process */
 EXT struct rx_queue rx_idleServerQueue;
 
-/* Constant delay time before sending an acknowledge of the last packet received.  This is to avoid sending an extra acknowledge when the client is about to make another call, anyway, or the server is about to respond. */
-EXT struct clock rx_lastAckDelay;
-
 /* Constant delay time before sending a hard ack if the receiver consumes
  * a packet while no delayed ack event is scheduled. Ensures that the
  * sender is able to advance its window when the receiver consumes a packet
@@ -59,11 +56,6 @@ EXT struct clock rx_lastAckDelay;
  */
 EXT struct clock rx_hardAckDelay;
 
-/* Constant delay time before sending a soft ack when none was requested.
- * This is to make sure we send soft acks before the sender times out,
- * Normally we wait and send a hard ack when the receiver consumes the packet */
-EXT struct clock rx_softAckDelay;
-
 #if defined(RXDEBUG) || defined(AFS_NT40_ENV)
 /* Variable to allow introduction of network unreliability; exported from libafsrpc */
 EXT int rx_intentionallyDroppedPacketsPer100 GLOBALSINIT(0);   /* Dropped on Send */