From patchwork Sun Jan 6 07:35:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 209730 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 8C69E2C007B for ; Sun, 6 Jan 2013 18:35:32 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751124Ab3AFHf3 (ORCPT ); Sun, 6 Jan 2013 02:35:29 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:61199 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945Ab3AFHf2 (ORCPT ); Sun, 6 Jan 2013 02:35:28 -0500 Received: by mail-pa0-f49.google.com with SMTP id bi1so10132400pad.36 for ; Sat, 05 Jan 2013 23:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:subject:from:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=EpkKI4jmyh3vOquh5MHoFQF0Etd2oBS/8FnzMQWHrTo=; b=ezwUFV5L30fsrb4ZmX/XiqaBnyedqvo9aqPDSF3GlRXExv4UaHA/Hy9MbDuy4s6Tjd ndYKLhNZVfDJl5hXk53QvHVpfAoFpilD9lN8Ff1eoB1e+YWaovia28cdtX4MpIVBdRi5 xOAcDAdq0jNX+sUmkNQpebhqiYvPlooEz/ALFl+/D3M1zRqx3K2aza3xMoLRSOExNTir +A1uxrWjlVNeM9ho3HBEcF3jmATms3Aq3y4dLZaWUrGsPz/R6D3jWpsZVCns7IPKAkc5 RMxxbORHs/L/EaFf17NTa5SR7CfC39vkXajmUALybdafhRpFFnGCqlTp0QmINg3aa0zz vuHA== X-Received: by 10.68.135.99 with SMTP id pr3mr178153690pbb.151.1357457727206; Sat, 05 Jan 2013 23:35:27 -0800 (PST) Received: from [172.26.54.35] ([172.26.54.35]) by mx.google.com with ESMTPS id kc4sm35391986pbc.23.2013.01.05.23.35.25 (version=SSLv3 cipher=OTHER); Sat, 05 Jan 2013 23:35:26 -0800 (PST) Subject: Re: Major network performance regression in 3.7 From: Eric Dumazet To: Willy Tarreau Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20130106025256.GY16031@1wt.eu> References: <20130105214958.GA19814@1wt.eu> <1357427926.1678.4771.camel@edumazet-glaptop> <20130105232913.GQ16031@1wt.eu> <1357430523.1678.4901.camel@edumazet-glaptop> <20130106005053.GS16031@1wt.eu> <1357435276.1678.5067.camel@edumazet-glaptop> <20130106013027.GV16031@1wt.eu> <1357436430.1678.5111.camel@edumazet-glaptop> <1357437086.1678.5135.camel@edumazet-glaptop> <1357438591.1678.5205.camel@edumazet-glaptop> <20130106025256.GY16031@1wt.eu> Date: Sat, 05 Jan 2013 23:35:24 -0800 Message-ID: <1357457724.1678.5941.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, 2013-01-06 at 03:52 +0100, Willy Tarreau wrote: > OK so I observed no change with this patch, either on the loopback > data rate at >16kB MTU, or on the myri. I'm keeping it at hand for > experimentation anyway. > Yeah, there was no bug. I rewrote it for net-next as a cleanup/optim only. > Concerning the loopback MTU, I find it strange that the MTU changes > the splice() behaviour and not send/recv. I thought that there could > be a relation between the MTU and the pipe size, but it does not > appear to be the case either, as I tried various sizes between 16kB > and 256kB without achieving original performance. It probably is related to a too small receive window, given the MTU was multiplied by 4, I guess we need to make some adjustments You also could try : --- 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 --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 1ca2536..b68cdfb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1482,6 +1482,9 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, break; } used = recv_actor(desc, skb, offset, len); + /* Clean up data we have read: This will do ACK frames. */ + if (used > 0) + tcp_cleanup_rbuf(sk, used); if (used < 0) { if (!copied) copied = used;