Ubuntu-focal-kernel/include
Neal Cardwell 47d83da8d1 tcp: fix quick-ack counting to count actual ACKs of new data
BugLink: https://bugs.launchpad.net/bugs/2042107

[ Upstream commit 059217c18be6757b95bfd77ba53fb50b48b8a816 ]

This commit fixes quick-ack counting so that it only considers that a
quick-ack has been provided if we are sending an ACK that newly
acknowledges data.

The code was erroneously using the number of data segments in outgoing
skbs when deciding how many quick-ack credits to remove. This logic
does not make sense, and could cause poor performance in
request-response workloads, like RPC traffic, where requests or
responses can be multi-segment skbs.

When a TCP connection decides to send N quick-acks, that is to
accelerate the cwnd growth of the congestion control module
controlling the remote endpoint of the TCP connection. That quick-ack
decision is purely about the incoming data and outgoing ACKs. It has
nothing to do with the outgoing data or the size of outgoing data.

And in particular, an ACK only serves the intended purpose of allowing
the remote congestion control to grow the congestion window quickly if
the ACK is ACKing or SACKing new data.

The fix is simple: only count packets as serving the goal of the
quickack mechanism if they are ACKing/SACKing new data. We can tell
whether this is the case by checking inet_csk_ack_scheduled(), since
we schedule an ACK exactly when we are ACKing/SACKing new data.

Fixes: fc6415bcb0 ("[TCP]: Fix quick-ack decrementing with TSO.")
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231001151239.1866845-1-ncardwell.sw@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-01-05 14:29:52 +01:00
..
acpi
asm-generic word-at-a-time: use the same return type for has_zero regardless of endianness 2023-10-30 11:41:48 +01:00
clocksource
crypto
drm drm/display/dp: Fix the DP DSC Receiver cap size 2023-10-30 11:42:02 +01:00
dt-bindings
keys
kvm
linux netfilter: handle the connecting collision properly in nf_conntrack_proto_sctp 2024-01-05 14:29:52 +01:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-10-30 11:41:55 +01:00
misc
net tcp: fix quick-ack counting to count actual ACKs of new data 2024-01-05 14:29:52 +01:00
pcmcia
ras
rdma
scsi scsi: core: Use 32-bit hostnum in scsi_host_lookup() 2023-10-30 11:42:15 +01:00
soc
sound ALSA: pcm: Set per-card upper limit of PCM buffer allocations 2023-10-30 11:42:00 +01:00
target
trace PM-runtime: add tracepoints for usage_count changes 2023-10-30 11:41:56 +01:00
uapi bpf: Clarify error expectations from bpf_clone_redirect 2024-01-05 14:29:49 +01:00
vdso
video
xen