[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181204.212145.97568551688753578.davem@davemloft.net>
Date: Tue, 04 Dec 2018 21:21:45 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com, soheil@...gle.com
Subject: Re: [PATCH net-next] tcp: reduce POLLOUT events caused by
TCP_NOTSENT_LOWAT
From: Eric Dumazet <edumazet@...gle.com>
Date: Tue, 4 Dec 2018 07:58:17 -0800
> TCP_NOTSENT_LOWAT socket option or sysctl was added in linux-3.12
> as a step to enable bigger tcp sndbuf limits.
>
> It works reasonably well, but the following happens :
>
> Once the limit is reached, TCP stack generates
> an [E]POLLOUT event for every incoming ACK packet.
>
> This causes a high number of context switches.
>
> This patch implements the strategy David Miller added
> in sock_def_write_space() :
>
> - If TCP socket has a notsent_lowat constraint of X bytes,
> allow sendmsg() to fill up to X bytes, but send [E]POLLOUT
> only if number of notsent bytes is below X/2
>
> This considerably reduces TCP_NOTSENT_LOWAT overhead,
> while allowing to keep the pipe full.
...
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>
Applied, thanks Eric.
Powered by blists - more mailing lists