lkml.org 
[lkml]   [2023]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next,v3] tcp: Set pingpong threshold via sysctl
On Wed, Oct 11, 2023 at 10:31 PM Haiyang Zhang <haiyangz@microsoft.com> wrote:
>
> TCP pingpong threshold is 1 by default. But some applications, like SQL DB
> may prefer a higher pingpong threshold to activate delayed acks in quick
> ack mode for better performance.
>

...

>
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index f207712eece1..7d0fe76d56ef 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -170,10 +170,10 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
> tp->lsndtime = now;
>
> /* If it is a reply for ato after last received
> - * packet, enter pingpong mode.
> + * packet, increase pingpong count.
> */
> if ((u32)(now - icsk->icsk_ack.lrcvtime) < icsk->icsk_ack.ato)
> - inet_csk_enter_pingpong_mode(sk);
> + inet_csk_inc_pingpong_cnt(sk);
> }
>
> /* Account for an ACK we sent. */

OK, but I do not think we solved the fundamental problem of using
jiffies for this heuristic,
especially for HZ=100 or HZ=250 builds.

Reviewed-by: Eric Dumazet <edumazet@google.com>

\
 
 \ /
  Last update: 2023-10-16 13:43    [W:0.249 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site