提交 825e1c52 编写于 作者: E Eric Dumazet 提交者: David S. Miller

tcp: cdg: use tcp high resolution clock cache

We store in tcp socket a cache of most recent high resolution
clock, there is no need to call local_clock() again, since
this cache is good enough.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 97ec3eb3
...@@ -146,7 +146,7 @@ static void tcp_cdg_hystart_update(struct sock *sk) ...@@ -146,7 +146,7 @@ static void tcp_cdg_hystart_update(struct sock *sk)
return; return;
if (hystart_detect & HYSTART_ACK_TRAIN) { if (hystart_detect & HYSTART_ACK_TRAIN) {
u32 now_us = div_u64(local_clock(), NSEC_PER_USEC); u32 now_us = tp->tcp_mstamp;
if (ca->last_ack == 0 || !tcp_is_cwnd_limited(sk)) { if (ca->last_ack == 0 || !tcp_is_cwnd_limited(sk)) {
ca->last_ack = now_us; ca->last_ack = now_us;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册