PERFORCE change 124334 for review

Peter Wemm peter at FreeBSD.org
Mon Jul 30 05:52:45 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=124334

Change 124334 by peter at peter_overcee on 2007/07/30 05:52:31

	TCPTV_MIN is in units of ticks.  When we change HZ=1000, the default value
	is now 1/10th of the original value.  This is important because it means tcp
	sessions now time out at around 10-12 seconds instead of the old behavior of
	105-130 seconds on a local ethernet session.  A 10 second outage is real easy
	to achieve if you bump or move ethernet cables etc.

Affected files ...

.. //depot/projects/hammer/sys/dev/si/si.c#24 edit
.. //depot/projects/hammer/sys/dev/si/si_pci.c#8 edit
.. //depot/projects/hammer/sys/netinet/tcp_subr.c#70 edit
.. //depot/projects/hammer/sys/netinet/tcp_timer.h#12 edit

Differences ...

==== //depot/projects/hammer/sys/dev/si/si.c#24 (text+ko) ====


==== //depot/projects/hammer/sys/dev/si/si_pci.c#8 (text+ko) ====

@@ -105,6 +105,21 @@
 		goto fail;
 	}
 
+	if (pci_get_devid(dev) == 0x200011cb) {
+		/* Perform a PLX control register fixup */
+		int rid = PCIR_BAR(0);
+		plx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
+						&rid, RF_ACTIVE);
+		if (plx_res == NULL) {
+			device_printf(dev, "couldn't map plx registers\n");
+		} else {
+			uint32_t *maddr;
+			addr = rman_get_virtual(plx_res);
+			device_printf(dev, "PLX register 0x50: 0x%08x\n", addr[0x50 / 4]);
+			bus_release_resource(dev, SYS_RES_MEMORY, rid, plx_res);
+		}
+	}
+
 	error = siattach(dev);
 	if (error)
 		goto fail;

==== //depot/projects/hammer/sys/netinet/tcp_subr.c#70 (text+ko) ====

@@ -258,7 +258,7 @@
 	tcp_keepintvl = TCPTV_KEEPINTVL;
 	tcp_maxpersistidle = TCPTV_KEEP_IDLE;
 	tcp_msl = TCPTV_MSL;
-	tcp_rexmit_min = TCPTV_MIN;
+	tcp_rexmit_min = TCPTV_MIN < 1 ? 1 : TCPTV_MIN;
 	tcp_rexmit_slop = TCPTV_CPU_VAR;
 	tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH;
 	tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT;

==== //depot/projects/hammer/sys/netinet/tcp_timer.h#12 (text+ko) ====

@@ -111,7 +111,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 */
 


More information about the p4-projects mailing list