aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2016-04-15 13:33:04 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-15 16:09:05 -0400
commit88e8ac7000dc7ccf99975cc4070907e26a1027f9 (patch)
tree1b86555af16af03aca085e17c57508a8eb452e15 /net/tipc
parent634696b197411e7a95b346d6e5c21841f29fcedd (diff)
tipc: reduce transmission rate of reset messages when link is down
When a link is down, it will continuously try to re-establish contact with the peer by sending out a RESET or an ACTIVATE message at each timeout interval. The default value for this interval is currently 375 ms. This is wasteful, and may become a problem in very large clusters with dozens or hundreds of nodes being down simultaneously. We now introduce a simple backoff algorithm for these cases. The first five messages are sent at default rate; thereafter a message is sent only each 16th timer interval. This will cover the vast majority of link recycling cases, since the endpoint starting last will transmit at the higher speed, and the link should normally be established well be before the rate needs to be reduced. The only case where we will see a degradation of link re-establishment times is when the endpoints remain intact, and a glitch in the transmission media is causing the link reset. We will then experience a worst-case re-establishing time of 6 seconds, something we deem acceptable. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 8b98fafc88a4..238b12526b58 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -140,6 +140,7 @@ struct tipc_link {
140 char if_name[TIPC_MAX_IF_NAME]; 140 char if_name[TIPC_MAX_IF_NAME];
141 u32 priority; 141 u32 priority;
142 char net_plane; 142 char net_plane;
143 u16 rst_cnt;
143 144
144 /* Failover/synch */ 145 /* Failover/synch */
145 u16 drop_point; 146 u16 drop_point;
@@ -701,8 +702,6 @@ static void link_profile_stats(struct tipc_link *l)
701 702
702/* tipc_link_timeout - perform periodic task as instructed from node timeout 703/* tipc_link_timeout - perform periodic task as instructed from node timeout
703 */ 704 */
704/* tipc_link_timeout - perform periodic task as instructed from node timeout
705 */
706int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq) 705int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq)
707{ 706{
708 int rc = 0; 707 int rc = 0;
@@ -730,7 +729,8 @@ int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq)
730 l->silent_intv_cnt++; 729 l->silent_intv_cnt++;
731 break; 730 break;
732 case LINK_RESET: 731 case LINK_RESET:
733 xmit = true; 732 xmit = l->rst_cnt++ <= 4;
733 xmit |= !(l->rst_cnt % 16);
734 mtyp = RESET_MSG; 734 mtyp = RESET_MSG;
735 break; 735 break;
736 case LINK_ESTABLISHING: 736 case LINK_ESTABLISHING:
@@ -833,6 +833,7 @@ void tipc_link_reset(struct tipc_link *l)
833 l->rcv_nxt = 1; 833 l->rcv_nxt = 1;
834 l->acked = 0; 834 l->acked = 0;
835 l->silent_intv_cnt = 0; 835 l->silent_intv_cnt = 0;
836 l->rst_cnt = 0;
836 l->stats.recv_info = 0; 837 l->stats.recv_info = 0;
837 l->stale_count = 0; 838 l->stale_count = 0;
838 l->bc_peer_is_up = false; 839 l->bc_peer_is_up = false;