]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh
authorEric Dumazet <edumazet@google.com>
Mon, 15 Oct 2018 16:37:52 +0000 (09:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 05:56:41 +0000 (22:56 -0700)
commite152208b960496df57de1d38c67254d346576093
tree17f35c12eeef92a69902b197a73c1123eaac9e63
parentdab26dbc2921b4d3693d723f148f628273ea5a2d
tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh

In EDT design, I made the mistake of using tcp_wstamp_ns
to store the last tcp_clock_ns() sample and to store the
pacing virtual timer.

This causes major regressions at high speed flows.

Introduce tcp_clock_cache to store last tcp_clock_ns().
This is needed because some arches have slow high-resolution
kernel time service.

tcp_wstamp_ns is only updated when a packet is sent.

Note that we can remove tcp_mstamp in the future since
tcp_mstamp is essentially tcp_clock_cache/1000, so the
apparent socket size increase is temporary.

Fixes: 73299eb909fa ("tcp: add tcp_wstamp_ns socket field")
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/linux/tcp.h
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c