cvs commit: src/sys/netinet tcp_subr.c tcp_timer.h

Ruslan Ermilov ru at FreeBSD.org
Tue Dec 18 03:49:40 PST 2007


Hi,

On Tue, Dec 18, 2007 at 03:39:17AM +0000, Peter Wemm wrote:
> peter       2007-12-18 03:39:17 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:        (Branch: RELENG_6)
>     sys/netinet          tcp_subr.c tcp_timer.h 
>   Log:
>   MFC: scale TCPTV_MIN with hz, not a fixed number of ticks.  Otherwise
>   machines with hz=1000 drop connections in a matter of a few seconds on a
>   fast link (eg: ethernet).  With this change, it drops them in the same
>   time as a machine with hz=100 would.
>   
>   Revision    Changes    Path
>   1.228.2.16  +2 -0      src/sys/netinet/tcp_subr.c
>   1.27.2.4    +1 -1      src/sys/netinet/tcp_timer.h

That explains why I couldn't find a matching code for the following
comment in HEAD this morning (just above the changed code):

 * Minimum retransmit timer is 3 ticks, for algorithmic stability.

Please fix.  Also, the last sentence in this comment block now
looks rotted:

 * The prior minimum of 1*hz (1 second) badly breaks throughput on any
 * networks faster then a modem that has minor (e.g. 1%) packet loss.

> Index: src/sys/netinet/tcp_timer.h
> diff -u src/sys/netinet/tcp_timer.h:1.27.2.3 src/sys/netinet/tcp_timer.h:1.27.2.4
> --- src/sys/netinet/tcp_timer.h:1.27.2.3	Fri Sep 15 09:51:05 2006
> +++ src/sys/netinet/tcp_timer.h	Tue Dec 18 03:39:17 2007
> @@ -109,7 +109,7 @@
>   * The prior minimum of 1*hz (1 second) badly breaks throughput on any
>   * networks faster then a modem that has minor (e.g. 1%) packet loss.
>   */
> -#define	TCPTV_MIN	( 3 )			/* minimum allowable value */
> +#define	TCPTV_MIN	( hz/33 )		/* minimum allowable value */
>  #define TCPTV_CPU_VAR	( hz/5 )		/* cpu variance allowed (200ms) */
>  #define	TCPTV_REXMTMAX	( 64*hz)		/* max allowable REXMT value */


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer


More information about the cvs-src mailing list