From patchwork Fri Nov 9 02:54:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Cardwell X-Patchwork-Id: 995287 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="Mmvxgn9W"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42rl9H6WSgz9s9G for ; Fri, 9 Nov 2018 13:54:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbeKIMck (ORCPT ); Fri, 9 Nov 2018 07:32:40 -0500 Received: from mail-yw1-f73.google.com ([209.85.161.73]:39661 "EHLO mail-yw1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727349AbeKIMck (ORCPT ); Fri, 9 Nov 2018 07:32:40 -0500 Received: by mail-yw1-f73.google.com with SMTP id 4-v6so935198ywb.6 for ; Thu, 08 Nov 2018 18:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=ySIAG3w3RcZeG49LBVv0h+A5g/kTabMIWnyxdO68boE=; b=Mmvxgn9WLVx3dE3jD+z+kVVw/RZRoKJKhdlyg3HewkhRYbVI5eCxmcf42s4f06cSxA yg0wkQm4ZIpEIBvOsSaZ3sg6+CMenU4slZFV0nX4m7eME6EHt6IHDy/2KU8bVrkXTByM pFQl+7Sz+X4sHBnIBfUvz5U0+EbsBPaYG8VPhaICKPePXZT/F+P9mbRgi75gPQWIhwtg jG9foJR9I907mm9cvFxZuEmbg9rd4CgTwCKtZJB2OsxPeEuNIs4Bwd+mZRtuDEtRRNP1 CpaAOltBi5VpkJJQlgM4zOo7VspO5tevw403VQ+kTzaNzK1c99TFCgEMUEOrABHD+Q3f fu2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=ySIAG3w3RcZeG49LBVv0h+A5g/kTabMIWnyxdO68boE=; b=Dp9vdQQnU92t820IhtzQ5La2dqLUfDiTeMVW19gQps+LWfCJopXoXPx02DPODNk9vB DdgmcyxGPht9g40IE2gnxdmUolykf6AwQQfgPXthIbS14M95ECeCotzPn91SoQoryGKB +CHHV24LNcz2Zb9FH3hEYcGm3Oxo0gifemhphKrisuDu2SHTCHjFMKafDMf1TzpJnBjk OMmuVxocxHUXOFC0e0D/qfa9otsHk8D7w0Dh8dsedcZAoHm7ODcC/RftT8S4gYMW2SYp 3ubvDM4l+gx8HmwTGkX4YacfBpeCh2ePffU77A1+OXYWIxpWjRJBR9dxsWmSjT4iiVXd ZZDQ== X-Gm-Message-State: AGRZ1gIEazXUiibSUoOUywvH5fLqYAiq5bsjDog/AvJTDTUJAurizF/R kia8vzIeAehoNOk6jfF1mfRWwvO7sbJXTLk= X-Google-Smtp-Source: AJdET5c0rU1SPjD+gBh+Cb0ALSRmJPZmpk7Rv0/AzQ4h02krvwlZdU+kn6yaoLEve6PBCM4+XrV55yrf6y8xUjw= X-Received: by 2002:a0c:d022:: with SMTP id u31mr4737020qvg.35.1541732046120; Thu, 08 Nov 2018 18:54:06 -0800 (PST) Date: Thu, 8 Nov 2018 21:54:00 -0500 Message-Id: <20181109025400.38021-1-ncardwell@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [PATCH net-next] tcp_bbr: update comments to reflect pacing_margin_percent From: Neal Cardwell To: David Miller Cc: netdev@vger.kernel.org, Neal Cardwell , Yuchung Cheng , Soheil Hassas Yeganeh , Eric Dumazet Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Recently, in commit ab408b6dc744 ("tcp: switch tcp and sch_fq to new earliest departure time model"), the TCP BBR code switched to a new approach of using an explicit bbr_pacing_margin_percent for shaving a pacing rate "haircut", rather than the previous implict approach. Update an old comment to reflect the new approach. Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet --- net/ipv4/tcp_bbr.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index 9277abdd822a0..0f497fc49c3fe 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -128,7 +128,12 @@ static const u32 bbr_probe_rtt_mode_ms = 200; /* Skip TSO below the following bandwidth (bits/sec): */ static const int bbr_min_tso_rate = 1200000; -/* Pace at ~1% below estimated bw, on average, to reduce queue at bottleneck. */ +/* Pace at ~1% below estimated bw, on average, to reduce queue at bottleneck. + * In order to help drive the network toward lower queues and low latency while + * maintaining high utilization, the average pacing rate aims to be slightly + * lower than the estimated bandwidth. This is an important aspect of the + * design. + */ static const int bbr_pacing_margin_percent = 1; /* We use a high_gain value of 2/ln(2) because it's the smallest pacing gain @@ -247,13 +252,7 @@ static void bbr_init_pacing_rate_from_rtt(struct sock *sk) sk->sk_pacing_rate = bbr_bw_to_pacing_rate(sk, bw, bbr_high_gain); } -/* Pace using current bw estimate and a gain factor. In order to help drive the - * network toward lower queues while maintaining high utilization and low - * latency, the average pacing rate aims to be slightly (~1%) lower than the - * estimated bandwidth. This is an important aspect of the design. In this - * implementation this slightly lower pacing rate is achieved implicitly by not - * including link-layer headers in the packet size used for the pacing rate. - */ +/* Pace using current bw estimate and a gain factor. */ static void bbr_set_pacing_rate(struct sock *sk, u32 bw, int gain) { struct tcp_sock *tp = tcp_sk(sk);