提交 3b585b34 编写于 作者: S stephen hemminger 提交者: David S. Miller

tcp_cubic: enable high resolution ack time if needed

This is a refined version of an earlier patch by Lucas Nussbaum.
Cubic needs RTT values in milliseconds. If HZ < 1000 then
the values will be too coarse.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Reported-by: NLucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 17a6e9f1
......@@ -459,6 +459,10 @@ static int __init cubictcp_register(void)
/* divide by bic_scale and by constant Srtt (100ms) */
do_div(cube_factor, bic_scale * 10);
/* hystart needs ms clock resolution */
if (hystart && HZ < 1000)
cubictcp.flags |= TCP_CONG_RTT_STAMP;
return tcp_register_congestion_control(&cubictcp);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册