|
@@ -755,7 +755,12 @@ static void tcp_update_pacing_rate(struct sock *sk)
|
|
|
if (tp->srtt > 8 + 2)
|
|
|
do_div(rate, tp->srtt);
|
|
|
|
|
|
- sk->sk_pacing_rate = min_t(u64, rate, sk->sk_max_pacing_rate);
|
|
|
+ /* ACCESS_ONCE() is needed because sch_fq fetches sk_pacing_rate
|
|
|
+ * without any lock. We want to make sure compiler wont store
|
|
|
+ * intermediate values in this location.
|
|
|
+ */
|
|
|
+ ACCESS_ONCE(sk->sk_pacing_rate) = min_t(u64, rate,
|
|
|
+ sk->sk_max_pacing_rate);
|
|
|
}
|
|
|
|
|
|
/* Calculate rto without backoff. This is the second half of Van Jacobson's
|