login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-netdev
»
2010
»
February
»
18
Re: [net-next PATCH v5 3/3] net: TCP thin dupack
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?=
Subject:
Re: [net-next PATCH v5 3/3] net: TCP thin dupack
Date: Thursday, February 18, 2010 - 5:56 am
On Thu, 18 Feb 2010, Andreas Petlund wrote:
quoted text
> This patch enables fast retransmissions after one dupACK for > TCP if the stream is identified as thin. This will reduce > latencies for thin streams that are not able to trigger fast > retransmissions due to high packet interarrival time. This > mechanism is only active if enabled by iocontrol or syscontrol > and the stream is identified as thin. > > > Signed-off-by: Andreas Petlund <apetlund@simula.no> > --- > Documentation/networking/ip-sysctl.txt | 12 ++++++++++++ > include/linux/tcp.h | 4 +++- > include/net/tcp.h | 1 + > net/ipv4/sysctl_net_ipv4.c | 7 +++++++ > net/ipv4/tcp.c | 7 +++++++ > net/ipv4/tcp_input.c | 12 ++++++++++++ > 6 files changed, 42 insertions(+), 1 deletions(-) > > diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt > index f147310..2571a62 100644 > --- a/Documentation/networking/ip-sysctl.txt > +++ b/Documentation/networking/ip-sysctl.txt > @@ -499,6 +499,18 @@ tcp_thin_linear_timeouts - BOOLEAN > Documentation/networking/tcp-thin.txt > Default: 0 > > +tcp_thin_dupack - BOOLEAN > + Enable dynamic triggering of retransmissions after one dupACK > + for thin streams. If set, a check is performed upon reception > + of a dupACK to determine if the stream is thin (less than 4 > + packets in flight). As long as the stream is found to be thin, > + data is retransmitted on the first received dupACK. This > + improves retransmission latency for non-aggressive thin > + streams, often found to be time-dependent. > + For more information on thin streams, see > + Documentation/networking/tcp-thin.txt > + Default: 0 > + > UDP variables: > > udp_mem - vector of 3 INTEGERs: min, pressure, max > diff --git a/include/linux/tcp.h b/include/linux/tcp.h > index 3ba8b07..a778ee0 100644 > --- a/include/linux/tcp.h > +++ b/include/linux/tcp.h > @@ -104,6 +104,7 @@ enum { > #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ > #define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ > #define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ > +#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ > > /* for TCP_INFO socket option */ > #define TCPI_OPT_TIMESTAMPS 1 > @@ -343,7 +344,8 @@ struct tcp_sock { > u8 frto_counter; /* Number of new acks after RTO */ > u8 nonagle : 4,/* Disable Nagle algorithm? */ > thin_lto : 1,/* Use linear timeouts for thin streams */ > - unused : 3; > + thin_dupack : 1,/* Fast retransmit on first dupack */ > + unused : 2; > > /* RTT measurement */ > u32 srtt; /* smoothed round trip time << 3 */ > diff --git a/include/net/tcp.h b/include/net/tcp.h > index 6278fc7..56f0aec 100644 > --- a/include/net/tcp.h > +++ b/include/net/tcp.h > @@ -245,6 +245,7 @@ extern int sysctl_tcp_slow_start_after_idle; > extern int sysctl_tcp_max_ssthresh; > extern int sysctl_tcp_cookie_size; > extern int sysctl_tcp_thin_linear_timeouts; > +extern int sysctl_tcp_thin_dupack; > > extern atomic_t tcp_memory_allocated; > extern struct percpu_counter tcp_sockets_allocated; > diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c > index e6a2460..c1bc074 100644 > --- a/net/ipv4/sysctl_net_ipv4.c > +++ b/net/ipv4/sysctl_net_ipv4.c > @@ -582,6 +582,13 @@ static struct ctl_table ipv4_table[] = { > .mode = 0644, > .proc_handler = proc_dointvec > }, > + { > + .procname = "tcp_thin_dupack", > + .data = &sysctl_tcp_thin_dupack, > + .maxlen = sizeof(int), > + .mode = 0644, > + .proc_handler = proc_dointvec > + }, > { > .procname = "udp_mem", > .data = &sysctl_udp_mem, > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index 21bae9a..5901010 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -2236,6 +2236,13 @@ static int do_tcp_setsockopt(struct sock *sk, int level, > tp->thin_lto = val; > break; > > + case TCP_THIN_DUPACK: > + if (val < 0 || val > 1) > + err = -EINVAL; > + else > + tp->thin_dupack = val; > + break; > + > case TCP_CORK: > /* When set indicates to always queue non-full frames. > * Later the user clears this option and we transmit > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > index 3fddc69..8d950b9 100644 > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c > @@ -89,6 +89,8 @@ int sysctl_tcp_frto __read_mostly = 2; > int sysctl_tcp_frto_response __read_mostly; > int sysctl_tcp_nometrics_save __read_mostly; > > +int sysctl_tcp_thin_dupack __read_mostly; > + > int sysctl_tcp_moderate_rcvbuf __read_mostly = 1; > int sysctl_tcp_abc __read_mostly; > > @@ -2447,6 +2449,16 @@ static int tcp_time_to_recover(struct sock *sk) > return 1; > } > > + /* If a thin stream is detected, retransmit after first > + * received dupack. Employ only if SACK is supported in order > + * to avoid possible corner-case series of spurious retransmissions > + * Use only if there are no unsent data. > + */ > + if ((tp->thin_dupack || sysctl_tcp_thin_dupack) && > + tcp_stream_is_thin(tp) && tcp_dupack_heuristics(tp) > 1 && > + tcp_is_sack(tp) && sk->sk_send_head == NULL)
Use tcp_send_head(sk) instead.
quoted text
> + return 1; > + > return 0; > }
Other than that, Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> -- i.
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[net-next PATCH v5 0/3] net: TCP thin-stream latency-impro ...
, Andreas Petlund
, (Thu Feb 18, 5:42 am)
[net-next PATCH v5 1/3] net: TCP thin-stream detection
, Andreas Petlund
, (Thu Feb 18, 5:45 am)
[net-next PATCH v5 2/3] net: TCP thin linear timeouts
, Andreas Petlund
, (Thu Feb 18, 5:47 am)
[net-next PATCH v5 3/3] net: TCP thin dupack
, Andreas Petlund
, (Thu Feb 18, 5:48 am)
Re: [net-next PATCH v5 3/3] net: TCP thin dupack
, =?ISO-8859-15?Q?Ilpo ...
, (Thu Feb 18, 5:56 am)
[net-next PATCH v5.1 3/3] net: TCP thin dupack
, Andreas Petlund
, (Thu Feb 18, 7:48 am)
Re: [net-next PATCH v5 0/3] net: TCP thin-stream latency-i ...
, David Miller
, (Thu Feb 18, 4:43 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate