diff options
author | David Howells <dhowells@redhat.com> | 2017-06-14 12:56:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-14 15:42:45 -0400 |
commit | f7aec129a356ad049edddcb7e77b04a474fcf41f (patch) | |
tree | 103d3fb8a7c99b6c9ebaeaf20d2c891174d72f48 /net/rxrpc/call_object.c | |
parent | 0430a26054733de6e7884a4d2872613f9d8b9a66 (diff) |
rxrpc: Cache the congestion window setting
Cache the congestion window setting that was determined during a call's
transmission phase when it finishes so that it can be used by the next call
to the same peer, thereby shortcutting the slow-start algorithm.
The value is stored in the rxrpc_peer struct and is accessed without
locking. Each call takes the value that happens to be there when it starts
and just overwrites the value when it finishes.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/call_object.c')
-rw-r--r-- | net/rxrpc/call_object.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 423030fd93be..d7809a0620b4 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -136,12 +136,7 @@ struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp) | |||
136 | call->tx_winsize = 16; | 136 | call->tx_winsize = 16; |
137 | call->rx_expect_next = 1; | 137 | call->rx_expect_next = 1; |
138 | 138 | ||
139 | if (RXRPC_TX_SMSS > 2190) | 139 | call->cong_cwnd = 2; |
140 | call->cong_cwnd = 2; | ||
141 | else if (RXRPC_TX_SMSS > 1095) | ||
142 | call->cong_cwnd = 3; | ||
143 | else | ||
144 | call->cong_cwnd = 4; | ||
145 | call->cong_ssthresh = RXRPC_RXTX_BUFF_SIZE - 1; | 140 | call->cong_ssthresh = RXRPC_RXTX_BUFF_SIZE - 1; |
146 | return call; | 141 | return call; |
147 | 142 | ||