Skip to content

Commit fd2bca2

Browse files
Eric Dumazetdavem330
authored andcommitted
tcp: switch internal pacing timer to CLOCK_TAI
Next patch will use tcp_wstamp_ns to feed internal TCP pacing timer, so switch to CLOCK_TAI to share same base. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d3edd06 commit fd2bca2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

net/ipv4/tcp_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ static void tcp_internal_pacing(struct sock *sk, const struct sk_buff *skb)
10071007
len_ns = (u64)skb->len * NSEC_PER_SEC;
10081008
do_div(len_ns, rate);
10091009
hrtimer_start(&tcp_sk(sk)->pacing_timer,
1010-
ktime_add_ns(ktime_get(), len_ns),
1010+
ktime_add_ns(ktime_get_tai_ns(), len_ns),
10111011
HRTIMER_MODE_ABS_PINNED_SOFT);
10121012
sock_hold(sk);
10131013
}

net/ipv4/tcp_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ void tcp_init_xmit_timers(struct sock *sk)
758758
{
759759
inet_csk_init_xmit_timers(sk, &tcp_write_timer, &tcp_delack_timer,
760760
&tcp_keepalive_timer);
761-
hrtimer_init(&tcp_sk(sk)->pacing_timer, CLOCK_MONOTONIC,
761+
hrtimer_init(&tcp_sk(sk)->pacing_timer, CLOCK_TAI,
762762
HRTIMER_MODE_ABS_PINNED_SOFT);
763763
tcp_sk(sk)->pacing_timer.function = tcp_pace_kick;
764764

0 commit comments

Comments
 (0)