OSDN Git Service

tcp: get rid of tcp_tso_should_defer() dependency on HZ/jiffies
authorEric Dumazet <edumazet@google.com>
Sun, 11 Nov 2018 14:41:31 +0000 (06:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Nov 2018 21:54:53 +0000 (13:54 -0800)
commita682850a114aef947da5d603f7fd2cfe7eabbd72
tree1ba9698d64af24b2567bcd2d6cc590fb140ec386
parentf1c6ea3827b5e5ec62e297bcf4ccfd065326e8f7
tcp: get rid of tcp_tso_should_defer() dependency on HZ/jiffies

tcp_tso_should_defer() first heuristic is to not defer
if last send is "old enough".

Its current implementation uses jiffies and its low granularity.

TSO autodefer performance should not rely on kernel HZ :/

After EDT conversion, we have state variables in nanoseconds that
can allow us to properly implement the heuristic.

This patch increases TSO chunk sizes on medium rate flows,
especially when receivers do not use GRO or similar aggregation.

It also reduces bursts for HZ=100 or HZ=250 kernels, making TCP
behavior more uniform.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c