From patchwork Tue Jul 17 12:03:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Kumar X-Patchwork-Id: 171399 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 18CF72C0086 for ; Tue, 17 Jul 2012 22:04:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751546Ab2GQMEO (ORCPT ); Tue, 17 Jul 2012 08:04:14 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:35686 "EHLO e28smtp06.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060Ab2GQMEL (ORCPT ); Tue, 17 Jul 2012 08:04:11 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Jul 2012 17:34:07 +0530 Received: from d28relay04.in.ibm.com (9.184.220.61) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 17 Jul 2012 17:34:02 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6HC41s366060508 for ; Tue, 17 Jul 2012 17:34:01 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6HHXWZe002551 for ; Tue, 17 Jul 2012 23:03:34 +0530 Received: from localhost.localdomain ([9.126.238.103]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6HHXWOT002522; Tue, 17 Jul 2012 23:03:32 +0530 From: Krishna Kumar To: davem@davemloft.net, eric.dumazet@gmail.com Cc: netdev@vger.kernel.org, Krishna Kumar Date: Tue, 17 Jul 2012 17:33:58 +0530 Message-Id: <20120717120358.16611.98190.sendpatchset@localhost.localdomain> Subject: [PATCH] [RFC] tcp: TSQ - do not always throttle. x-cbid: 12071712-9574-0000-0000-0000039C273B Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Do not throttle if sysctl_tcp_limit_output_bytes==0. Maybe it is better to throttle earlier in the loop, after calling tcp_init_tso_segs(). Signed-off-by: Krishna Kumar --- tcp_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -ruNp org/net/ipv4/tcp_output.c new/net/ipv4/tcp_output.c --- org/net/ipv4/tcp_output.c 2012-07-17 09:56:12.000000000 +0530 +++ new/net/ipv4/tcp_output.c 2012-07-17 13:02:12.476111697 +0530 @@ -1948,7 +1948,8 @@ static bool tcp_write_xmit(struct sock * /* TSQ : sk_wmem_alloc accounts skb truesize, * including skb overhead. But thats OK. */ - if (atomic_read(&sk->sk_wmem_alloc) >= sysctl_tcp_limit_output_bytes) { + if (sysctl_tcp_limit_output_bytes > 0 && + atomic_read(&sk->sk_wmem_alloc) >= sysctl_tcp_limit_output_bytes) { set_bit(TSQ_THROTTLED, &tp->tsq_flags); break; }