On 03/27/2016 04:05 AM, Jon Maloy wrote:
> When a link is down, it will continuously try to re-establish contact
> with the peer by sending out a RESET 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 hundereds 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 16't timer interval.
> 
> This will cover the vast majority of link recyling 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
> is when the endpoins 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.
> 
> Signed-off-by: Jon Maloy <jon.ma...@ericsson.com>

Acked-by: Ying Xue <ying....@windriver.com>

> ---
>  net/tipc/link.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/tipc/link.c b/net/tipc/link.c
> index 7d2bb3e..d92d530 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -140,6 +140,7 @@ struct tipc_link {
>       char if_name[TIPC_MAX_IF_NAME];
>       u32 priority;
>       char net_plane;
> +     u16 rst_cnt;
>  
>       /* Failover/synch */
>       u16 drop_point;
> @@ -730,7 +731,8 @@ int tipc_link_timeout(struct tipc_link *l, struct 
> sk_buff_head *xmitq)
>               l->silent_intv_cnt++;
>               break;
>       case LINK_RESET:
> -             xmit = true;
> +             if ((l->rst_cnt++ <= 4) || !(l->rst_cnt % 16))
> +                     xmit = true;
>               mtyp = RESET_MSG;
>               break;
>       case LINK_ESTABLISHING:
> @@ -833,6 +835,7 @@ void tipc_link_reset(struct tipc_link *l)
>       l->rcv_nxt = 1;
>       l->acked = 0;
>       l->silent_intv_cnt = 0;
> +     l->rst_cnt = 0;
>       l->stats.recv_info = 0;
>       l->stale_count = 0;
>       l->bc_peer_is_up = false;
> 


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to