From patchwork Sat Feb 28 14:44:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 23882 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 9C9DEDDDA5 for ; Sun, 1 Mar 2009 01:45:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbZB1Ooz (ORCPT ); Sat, 28 Feb 2009 09:44:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752855AbZB1Oox (ORCPT ); Sat, 28 Feb 2009 09:44:53 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:53706 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbZB1Oor (ORCPT ); Sat, 28 Feb 2009 09:44:47 -0500 Received: from wrl-59.cs.helsinki.fi (wrl-59.cs.helsinki.fi [128.214.166.179]) (AUTH: PLAIN cs-relay, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by mail.cs.helsinki.fi with esmtp; Sat, 28 Feb 2009 16:44:43 +0200 id 0008C1BD.49A94DDB.000035E9 Received: by wrl-59.cs.helsinki.fi (Postfix, from userid 50795) id 065A9A00A8; Sat, 28 Feb 2009 16:44:43 +0200 (EET) From: "=?ISO-8859-1?Q?Ilpo_J=E4rvinen?=" To: David Miller Cc: netdev@vger.kernel.org, "=?utf-8?q?Ilpo=20J=C3=A4rvinen?=" Subject: [PATCH net-next 04/17] tcp: deferring in middle of queue makes very little sense Date: Sat, 28 Feb 2009 16:44:29 +0200 Message-Id: <12358322821182-git-send-email-ilpo.jarvinen@helsinki.fi> X-Mailer: git-send-email 1.5.2.2 In-Reply-To: <12358322823783-git-send-email-ilpo.jarvinen@helsinki.fi> References: <12358322821815-git-send-email-ilpo.jarvinen@helsinki.fi> <12358322821434-git-send-email-ilpo.jarvinen@helsinki.fi> <1235832282317-git-send-email-ilpo.jarvinen@helsinki.fi> <12358322823783-git-send-email-ilpo.jarvinen@helsinki.fi> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ilpo Järvinen If skb can be sent right away, we certainly should do that if it's in the middle of the queue because it won't get more data into it. Signed-off-by: Ilpo Järvinen --- net/ipv4/tcp_output.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 2471cd4..fa3c81a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1356,6 +1356,10 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb) if (limit >= sk->sk_gso_max_size) goto send_now; + /* Middle in queue won't get any more data, full sendable already? */ + if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len)) + goto send_now; + if (sysctl_tcp_tso_win_divisor) { u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);