]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: change node timer unit from jiffies to ms
authorJon Paul Maloy <jon.maloy@ericsson.com>
Wed, 8 Jun 2016 16:00:05 +0000 (12:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jun 2016 18:27:02 +0000 (11:27 -0700)
commit15a010db9353c1ec2848aa9fc39cb779ae98935a
tree13904d6d2fc5ee71548362698378e7206dfcbdab
parentb3bc8925845d574443e7d5e0f2d9bc28e63dc18a
tipc: change node timer unit from jiffies to ms

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: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c
net/tipc/node.c