rxrpc: Move the cwnd degradation after transmitting packets
authorDavid Howells <dhowells@redhat.com>
Fri, 11 Nov 2022 13:47:35 +0000 (13:47 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 1 Dec 2022 13:36:43 +0000 (13:36 +0000)
commit5086d9a9dfec4866806da303115489b0606decb7
tree286a9b9c8cf80a3e853baa20cdf4bac9cc425718
parent32cf8edb079a6a687a2b5dba39a813a0bbd0ddf9
rxrpc: Move the cwnd degradation after transmitting packets

When we've gone for >1RTT without transmitting a packet, we should reduce
the ssthresh and cut the cwnd by half (as suggested in RFC2861 sec 3.1).

However, we may receive ACK packets in a batch and the first of these may
cut the cwnd, preventing further transmission, and each subsequent one cuts
the cwnd yet further, reducing it to the floor and killing performance.

Fix this by moving the cwnd reset to after doing the transmission and
resetting the base time such that we don't cut the cwnd by half again for
at least another RTT.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
net/rxrpc/ar-internal.h
net/rxrpc/call_event.c
net/rxrpc/input.c
net/rxrpc/proc.c