• Jon Paul Maloy's avatar
    tipc: change node timer unit from jiffies to ms · 5ca509fc
    Jon Paul Maloy authored
    The node keepalive interval is recalculated at each timer expiration
    to catch any changes in the link tolerance, and stored in a field in
    struct tipc_node. We use jiffies as unit for the stored value.
    
    This is suboptimal, because it makes the calculation unnecessary
    complex, including two unit conversions. The conversions also lead to
    a rounding error that causes the link "abort limit" to be 3 in the
    normal case, instead of 4, as intended. This again leads to unnecessary
    link resets when the network is pushed close to its limit, e.g., in an
    environment with hundreds of nodes or namesapces.
    
    In this commit, we do instead let the keepalive value be calculated and
    stored in milliseconds, so that there is only one conversion and the
    rounding error is eliminated.
    
    We also remove a redundant "keepalive" field in struct tipc_link. This
    is remnant from the previous implementation.
    Acked-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5ca509fc
node.c 48.4 KB