Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp72044ybb; Thu, 19 Mar 2020 11:52:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvHrj0TyGlnZTOx/pS8jJSfm8/ZA2vhpKEAhvPh25+7Kgxhib2OByLZNwILFiQ/BArQmk7x X-Received: by 2002:a9d:6ad9:: with SMTP id m25mr3579614otq.119.1584643951799; Thu, 19 Mar 2020 11:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584643951; cv=none; d=google.com; s=arc-20160816; b=YMnRgtxY+0/EmoaOJ52r7N2hwiieg8Y8Lx9814teDQUD148TDRWaTDMvIs9KztsEJM HRZqm5qpNSm+7jug3XbBo4HxiHk8nfZs2aKijrmYVQzDHfHe3mvF8TJBLeDJCHIZSL4w Qarso5hzLq/Q9NFo3IfyDCcijY0YnmOZmDYWMRoxK9ydX8zGJ5D0hgZcweBCnZE8QBoV jHee6/rosZha+qH26mwNJ97ZBDGXRNGcKE/VJU5Po0qNRDB6FVEFAp+p7XgnWbEPiIuM by47DrLXnPFV8abQR/KtewNlFnILlVFiHgsgmbo9kv5DRuAJxxmj+vBocBUsapZRPPaw a7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rBBTCQZKvZ6z4WK9Xo1ZHxbyAdL21+7byNbe/ZRuw0c=; b=X92HntsAOraYzoPz5pkQW1Ea6Ilj+xppK4WPcjSI7MAiw9hmutqC/xQVSnbETXgoJ4 1uTL9T4USwDZsk+Vfutmn7uJJTBA3C2OziOBaRclAh7egejPeDwcGLSedWD0h2sB/OU8 ljr89dB/v854vUC8b2jXJT7YI60PCUSVT5jzEv0s46TcBw3cSxGxPZTLh2KnTFYIQW9g L9M3o7UpfFdzSz1N2hq7GIKEIfBaO/T501whrtbL40sNM0Zy8vQiS9JQ5O7vjnyKygsa bagVFZ1/ZA/BsZqVFMJd8kOvCpDHXvyAtNyXigHZ7sniJix+V29Mo10jNWXUWIx92q4A GIjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XhFaroa4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si1110074oig.151.2020.03.19.11.52.18; Thu, 19 Mar 2020 11:52:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XhFaroa4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727162AbgCSSuF (ORCPT + 99 others); Thu, 19 Mar 2020 14:50:05 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:34429 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgCSSuF (ORCPT ); Thu, 19 Mar 2020 14:50:05 -0400 Received: by mail-oi1-f193.google.com with SMTP id j5so3873676oij.1 for ; Thu, 19 Mar 2020 11:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rBBTCQZKvZ6z4WK9Xo1ZHxbyAdL21+7byNbe/ZRuw0c=; b=XhFaroa4eCglvWBaLqoGx9MgoSQz08cJbXAW+83d3oq38J3kmKbdac+qe8tbsyz94f fde9FijEu0Pzf5ZAlj3fP+vxLSdHGeuVBdAtLpmPCnHONapIvWZtlQMa5MHdKDcpiJ0C TQaPnJ6G34x4x4Cry5MRohLUZfdeJp128ssM45FGAS7+Tdy9+di26+87e5KE1aFT4iz5 0Zp/ALBc7761shhRrNpVICP/w4M9jwwI3lsb1/l+ogXAX3QsvQP+JG/Z89FuzVpYavN9 v+lu/05VA57PfymQrFLy2eDtyisWBiFnwivFX4Y9/LQmUW3+9ARBhu3XFhcIAKAzDVkT Q/fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rBBTCQZKvZ6z4WK9Xo1ZHxbyAdL21+7byNbe/ZRuw0c=; b=oTvuNXO8/HkKflDF34fOYiKXVIf+YU3BHsio4aeUd2wWNUnQUNxwfIJk9eLWjlkk7r h9w5do4gNJllAoPLoTVNJ5Pc7aVS4L6RSNP5MgtudXyU/0Jwy5iFD4BTQM6iLhZXdOQx 14nAPIhopgDFPb6Tfo2ukzd0fxiJ3jGyJIhseocyNjC4ju3X2X95fG/4HJwO2n8s2uhd Y0dMJx+kx3/aFk+bHU8LlENeVs1pCIkTTvdNU7wtAwpzQRcjdDFr34x4GmerAgUUQehD eceNdYxTrtH8zx+s4MB9pv1N9xD25YMm9FQkoAsWueYQN1ghOY+o7v878IqeETlYsekH vDwg== X-Gm-Message-State: ANhLgQ3d0NBVDHlqZcChpkTouCV42yg/FYlFpTrQnwOcBNeDakYU/chg 9VHw2RVmf1Xb4PLzz3zBZRnYDryYAfS8csbFlasdEw== X-Received: by 2002:a05:6808:48d:: with SMTP id z13mr3348154oid.79.1584643804372; Thu, 19 Mar 2020 11:50:04 -0700 (PDT) MIME-Version: 1.0 References: <1584599549-6793-1-git-send-email-yangpc@wangsu.com> In-Reply-To: <1584599549-6793-1-git-send-email-yangpc@wangsu.com> From: Neal Cardwell Date: Thu, 19 Mar 2020 14:49:47 -0400 Message-ID: Subject: Re: [PATCH RFC net-next] tcp: make cwnd-limited not affected by tcp internal pacing To: Pengcheng Yang Cc: Eric Dumazet , David Miller , Netdev , LKML , Yuchung Cheng , Soheil Hassas Yeganeh , Kevin Yang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 2:33 AM Pengcheng Yang wrote: > > The current cwnd-limited is set when cwnd is fully used > (inflight >= cwnd), which allows the congestion algorithm > to accurately determine whether cwnd needs to be added. > > However, there may be a problem when using tcp internal pacing: > In congestion avoidance phase, when a burst of packets are > acked by a stretched ACK or a burst of ACKs, this makes a large > reduction in inflight in a short time. At this time, the sender > sends data according to the pacing rate cannot fill CWND and > cwnd-limited is not set. The worst case is that cwnd-limited > is set only after the last packet in a window is sent. This causes > the congestion algorithm to be too conservative to increase CWND. > > The idea is that once cwnd-limited is set, it maintains a window period. > In this period, it is considered that the CWND is limited. This makes > the congestion algorithm unaffected by tcp internal pacing. > > Signed-off-by: Pengcheng Yang > --- Thanks for sending this patch! We ran into this bug in our team recently as well, and have been working on iterating on patches to fix it. I think this particular proposal in this patch does not properly persist the max_packets_out until all the ACKs have been received for a flight of data. The consequence of this would be that the cwnd does not grow properly in slow-start for cases where the max_packets_out is high enough to merit growing cwnd, but the connection is not strictly cwnd-limited. I'm a bit busy this week but I will try to put together and send out a proposed patch ASAP. best, neal