]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: add exponential backoff in __tcp_send_ack()
authorEric Dumazet <edumazet@google.com>
Wed, 30 Sep 2020 12:54:57 +0000 (05:54 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2020 21:21:30 +0000 (14:21 -0700)
commit10addf61bfd7a2d262ed48ad47fb200fac0be490
treef1ce9d23e66fd51f5efcd7ea38663db68f27d5ca
parent41d71277e8bf9f64b7dafd9fb74814ea40e92ede
tcp: add exponential backoff in __tcp_send_ack()

Whenever host is under very high memory pressure,
__tcp_send_ack() skb allocation fails, and we setup
a 200 ms (TCP_DELACK_MAX) timer before retrying.

On hosts with high number of TCP sockets, we can spend
considerable amount of cpu cycles in these attempts,
add high pressure on various spinlocks in mm-layer,
ultimately blocking threads attempting to free space
from making any progress.

This patch adds standard exponential backoff to avoid
adding fuel to the fire.

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>
include/net/inet_connection_sock.h
net/ipv4/tcp_output.c