Received: with ECARTIS (v1.0.0; list netdev); Wed, 29 Sep 2004 17:04:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i8U04Z9Q001526 for ; Wed, 29 Sep 2004 17:04:35 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CCoPf-0002UV-00; Wed, 29 Sep 2004 17:03:11 -0700 Date: Wed, 29 Sep 2004 17:03:10 -0700 From: "David S. Miller" To: John Heffner Cc: ak@suse.de, niv@us.ibm.com, herbert@gondor.apana.org.au, andy.grover@gmail.com, anton@samba.org, netdev@oss.sgi.com Subject: Re: bad TSO performance in 2.6.9-rc2-BK Message-Id: <20040929170310.46c58095.davem@davemloft.net> In-Reply-To: References: <20040929162923.796d142e.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9716 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1437 Lines: 38 On Wed, 29 Sep 2004 19:51:21 -0400 (EDT) John Heffner wrote: > On Wed, 29 Sep 2004, David S. Miller wrote: > > > Let me know if this cures the issue, and if it does we can > > move back to Andi's performance issue and the MSS stuff > > John Heffner just discovered. > > Seems to work for me. > > Using iperf, I'm getting ~ the same speed to a slow p3 receiver (680 > Mbits) with TSO on or off right now. Haven't tried netperf. Great, thanks for testing. I just pushed these changes into my tree at: bk://kernel.bkbits.net/davem/net-2.6 and asked Linus to pull them in. I think I'm going to make tcp_tso_acked() call tcp_trim_head() direclty so that skb->len and (end_seq - seq) are kept in sync. This will also correct a bug in tcp_tso_acked() wrt. URG processing. It uses the wrong sequence number currently. Luckily that code never runs currently because all URG packets are built non-TSO. Better to fix this than to let it bite us later. I think there are some other things we can do to make TSO work even better. We turn off TSO currently when we get SACKs, that stinks and is really unnecessary. We can keep track of sacking of sub-TSO frames by simply using a bitmask of some kind. I will have space for this if I move the tso_factor/tso_mss out of tcp_skb_cb[] and just use the tso_{size,segs} in skb_shinfo(skb) Anyways, I'll work on that stuff while the dust settles on the current bug fix.