From patchwork Tue Feb 3 01:18:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 5765891 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BA769F269 for ; Tue, 3 Feb 2015 01:19:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B66BE20A2C for ; Tue, 3 Feb 2015 01:18:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAB8C20A2B for ; Tue, 3 Feb 2015 01:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbbBCBSz (ORCPT ); Mon, 2 Feb 2015 20:18:55 -0500 Received: from mail-ig0-f174.google.com ([209.85.213.174]:43435 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754951AbbBCBSy (ORCPT ); Mon, 2 Feb 2015 20:18:54 -0500 Received: by mail-ig0-f174.google.com with SMTP id b16so22972543igk.1; Mon, 02 Feb 2015 17:18:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=MspQw7f6j8GUphW8QAvaUGymGuac1n8qc/PgRbtWUNY=; b=BghunWc5MIOH0J7je7tvcqbPCLPZsZwXBbnveqGw97PEU7pTUOwnx9Px8Y+eYiF5QP QUGD2UHO+WZMrIinp4RQ5N/kp3rD56xA8aViy/8aE4wxjCgUV7svLSw+Ag2vRYuv991v plEqXKVZ/7D18GYebEphVhWte/w9e3mS4EEOa8cT4qHmNhTFDrWDPRIb/jLfv54njfOE jOcQ1MQcnqXlS3Mq15cxXsNEGKXE5AnN0t4UsWf9c1i1NrLc5+lCksSLhi1+4qWv+csC NWY8CHFhU23sUH/qARjfLZRvesmSpEYachOquS7eILEniIo/nOn2pUpZys5UjSNh1PZE JaoA== X-Received: by 10.43.55.84 with SMTP id vx20mr21193949icb.62.1422926333325; Mon, 02 Feb 2015 17:18:53 -0800 (PST) Received: from ?IPv6:2620:0:1000:3e02:ad66:87f:1ce2:1b4? ([2620:0:1000:3e02:ad66:87f:1ce2:1b4]) by mx.google.com with ESMTPSA id n4sm7159628igr.15.2015.02.02.17.18.51 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 02 Feb 2015 17:18:52 -0800 (PST) Message-ID: <1422926330.21689.138.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: Throughput regression with `tcp: refine TSO autosizing` From: Eric Dumazet To: Michal Kazior Cc: linux-wireless , Network Development , eyalpe@dev.mellanox.co.il Date: Mon, 02 Feb 2015 17:18:50 -0800 In-Reply-To: <1422903136.21689.114.camel@edumazet-glaptop2.roam.corp.google.com> References: <1422537297.21689.15.camel@edumazet-glaptop2.roam.corp.google.com> <1422628835.21689.95.camel@edumazet-glaptop2.roam.corp.google.com> <1422903136.21689.114.camel@edumazet-glaptop2.roam.corp.google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 2015-02-02 at 10:52 -0800, Eric Dumazet wrote: > It seems to break ACK clocking badly (linux stack has a somewhat buggy > tcp_tso_should_defer(), which relies on ACK being received smoothly, as > no timer is setup to split the TSO packet.) Following patch might help the TSO split defer logic. It would avoid setting the TSO defer 'pseudo timer' twice, if/when TCP Small Queue logic prevented the xmit at the expiration of first 'timer'. This patch clears the tso_deferred variable only if we could really send something. Please try it, thanks ! @@ -2070,6 +2069,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) break; + tp->tso_deferred = 0; repair: /* Advance the send_head. This one is sent out. * This call will increment packets_out. --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 65caf8b95e17..e735f38557db 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1821,7 +1821,6 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb, return true; send_now: - tp->tso_deferred = 0; return false; }