mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
tcp: do not assume TCP code is non preemptible
We want to to make TCP stack preemptible, as draining prequeue and backlog queues can take lot of time. Many SNMP updates were assuming that BH (and preemption) was disabled. Need to convert some __NET_INC_STATS() calls to NET_INC_STATS() and some __TCP_INC_STATS() to TCP_INC_STATS() Before using this_cpu_ptr(net->ipv4.tcp_sk) in tcp_v4_send_reset() and tcp_v4_send_ack(), we add an explicit preempt disabled section. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5e59c83f23
commit
c10d9310ed
11 changed files with 104 additions and 99 deletions
|
@ -402,11 +402,11 @@ static void hystart_update(struct sock *sk, u32 delay)
|
|||
ca->last_ack = now;
|
||||
if ((s32)(now - ca->round_start) > ca->delay_min >> 4) {
|
||||
ca->found |= HYSTART_ACK_TRAIN;
|
||||
__NET_INC_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTTRAINDETECT);
|
||||
__NET_ADD_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTTRAINCWND,
|
||||
tp->snd_cwnd);
|
||||
NET_INC_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTTRAINDETECT);
|
||||
NET_ADD_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTTRAINCWND,
|
||||
tp->snd_cwnd);
|
||||
tp->snd_ssthresh = tp->snd_cwnd;
|
||||
}
|
||||
}
|
||||
|
@ -423,11 +423,11 @@ static void hystart_update(struct sock *sk, u32 delay)
|
|||
if (ca->curr_rtt > ca->delay_min +
|
||||
HYSTART_DELAY_THRESH(ca->delay_min >> 3)) {
|
||||
ca->found |= HYSTART_DELAY;
|
||||
__NET_INC_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTDELAYDETECT);
|
||||
__NET_ADD_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTDELAYCWND,
|
||||
tp->snd_cwnd);
|
||||
NET_INC_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTDELAYDETECT);
|
||||
NET_ADD_STATS(sock_net(sk),
|
||||
LINUX_MIB_TCPHYSTARTDELAYCWND,
|
||||
tp->snd_cwnd);
|
||||
tp->snd_ssthresh = tp->snd_cwnd;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue