diff options
author | Andreas Petlund <apetlund@simula.no> | 2010-02-18 03:47:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-19 00:43:08 +0100 |
commit | 36e31b0af58728071e8023cf8e20c5166b700717 (patch) | |
tree | 8b4d251bf78965ac7501bea9011786b8255a3312 /net/ipv4/tcp.c | |
parent | net: TCP thin-stream detection (diff) | |
download | linux-36e31b0af58728071e8023cf8e20c5166b700717.tar.xz linux-36e31b0af58728071e8023cf8e20c5166b700717.zip |
net: TCP thin linear timeouts
This patch will make TCP use only linear timeouts if the
stream is thin. This will help to avoid the very high latencies
that thin stream suffer because of exponential backoff. This
mechanism is only active if enabled by iocontrol or syscontrol
and the stream is identified as thin. A maximum of 6 linear
timeouts is tried before exponential backoff is resumed.
Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index e471d037fcc9..21bae9afefea 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2229,6 +2229,13 @@ static int do_tcp_setsockopt(struct sock *sk, int level, } break; + case TCP_THIN_LINEAR_TIMEOUTS: + if (val < 0 || val > 1) + err = -EINVAL; + else + tp->thin_lto = val; + break; + case TCP_CORK: /* When set indicates to always queue non-full frames. * Later the user clears this option and we transmit |