linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/3] tcp: Improve mtu probe preconditions
@ 2021-05-11 12:04 Leonard Crestez
  2021-05-11 12:04 ` [RFC 1/3] tcp: Consider mtu probing for tcp_xmit_size_goal Leonard Crestez
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Leonard Crestez @ 2021-05-11 12:04 UTC (permalink / raw)
  To: Neal Cardwell, Matt Mathis
  Cc: David S. Miller, Eric Dumazet, Willem de Bruijn, Jakub Kicinski,
	Hideaki YOSHIFUJI, David Ahern, John Heffner, Leonard Crestez,
	Soheil Hassas Yeganeh, Roopa Prabhu, netdev, linux-kernel

According to RFC4821 Section 7.4 "Protocols MAY delay sending non-probes
in order to accumulate enough data" but in practice linux only sends
probes when a lot of data accumulates on the send side.

Bigget improvement is to make tcp_xmit_size_goal (normally used for TSO)
take the probe size into account. This makes probes more likely to be
sent when applications use short writes. This should introduce no delays
beyond existing autocork heuristics.

TCP RACK allows timely loss detection with fewer outstanding packets
than fast transmit, if enabled we can use this to shrink the probe size
and require much less data for probing.

Successive mtu probes will result in reducing the cwnd since it's
measured in packets and we send bigger packets. The cwnd value can get
stuck below 11 so rework the cwnd logic in tcp_mtu_probe to be based on
the number of packets that we actually need to send.

Signed-off-by: Leonard Crestez <cdleonard@gmail.com>

---

Previous RFCs:
* https://lore.kernel.org/netdev/d7fbf3d3a2490d0a9e99945593ada243da58e0f8.1619000255.git.cdleonard@gmail.com/
* https://lore.kernel.org/netdev/c575e693788233edeb399d8f9b6d9217b3daed9b.1619403511.git.lcrestez@drivenets.com/

The sysctls can probably be dropped, they're there for easy
experimentation.

It is possible that I misunderstood the meaning of "return 0 to wait"
from tcp_mtu_probe.

This introduces a bunch of mtu-to-mss calculations inside
tcp_xmit_size_goal which is called on every write. It might make sense
to cache the size of a pending probe inside icsk_mtup.probe_size. Right
now it's zero unless a probe is outstanding; a separate bit could be
used intead.

Leonard Crestez (3):
  tcp: Consider mtu probing for tcp_xmit_size_goal
  tcp: Use mtu probes if RACK is enabled
  tcp: Adjust congestion window handling for mtu probe

 Documentation/networking/ip-sysctl.rst | 10 ++++
 include/net/inet_connection_sock.h     |  4 +-
 include/net/netns/ipv4.h               |  2 +
 include/net/tcp.h                      |  1 +
 net/ipv4/sysctl_net_ipv4.c             | 14 +++++
 net/ipv4/tcp.c                         | 11 +++-
 net/ipv4/tcp_ipv4.c                    |  2 +
 net/ipv4/tcp_output.c                  | 72 +++++++++++++++++++++-----
 8 files changed, 102 insertions(+), 14 deletions(-)


base-commit: 3913ba732e972d88ebc391323999e780a9295852
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-17 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 12:04 [RFC 0/3] tcp: Improve mtu probe preconditions Leonard Crestez
2021-05-11 12:04 ` [RFC 1/3] tcp: Consider mtu probing for tcp_xmit_size_goal Leonard Crestez
2021-05-11 13:04   ` Eric Dumazet
2021-05-17 13:42     ` Leonard Crestez
2021-05-11 12:04 ` [RFC 2/3] tcp: Use mtu probes if RACK is enabled Leonard Crestez
2021-05-11 12:04 ` [RFC 3/3] tcp: Adjust congestion window handling for mtu probe Leonard Crestez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).