Message ID | 20200128135819.488809136@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=oJ2n=3R=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8828BC33CB3 for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F61324688 for <stable@archiver.kernel.org>; Tue, 28 Jan 2020 14:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220099; bh=i9hNblF3nTcbkxYRaheT+L8fzmM/LUqzgDjnFimAaDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OoH1Tv//LxvwU40kjlXj0/mNyQ2EL7hz/mYGBlH+XxHw48PnNro64G8wo2hoArvyl 30YANWV6w/JkF03QxUfiwDUC5ow2UOybregMqQzGoAR38QXboYSupggwGAjyQhD/r4 CUAZrf6x/ED6b3zX8zoUUCGyfC/ptDRhNNIHTctg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727129AbgA1OBi (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 28 Jan 2020 09:01:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:47708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727164AbgA1OBh (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 28 Jan 2020 09:01:37 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF22D205F4; Tue, 28 Jan 2020 14:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220097; bh=i9hNblF3nTcbkxYRaheT+L8fzmM/LUqzgDjnFimAaDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1ZvRgM+LIzg8Xd2STWEl9SsSSZRwUGd7yo8c3fo3LOq22lfae/TQ4tnAAVYxuHHqR xN6GdpYxLqvsOcv7ZWzhFCMNDwy7RrdDPfZRbLEL57ry0TrufmrnYlK9S6MED+Y/ni LVLL9AcKeQ92KOD2FeeHXeRVUuap3lLthX2PYcVo= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Wen Yang <wenyang@linux.alibaba.com>, Eric Dumazet <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>, Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>, netdev@vger.kernel.org Subject: [PATCH 5.4 016/104] tcp_bbr: improve arithmetic division in bbr_update_bw() Date: Tue, 28 Jan 2020 14:59:37 +0100 Message-Id: <20200128135819.488809136@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135817.238524998@linuxfoundation.org> References: <20200128135817.238524998@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -779,8 +779,7 @@ static void bbr_update_bw(struct sock *s * bandwidth sample. Delivered is in packets and interval_us in uS and * ratio will be <<1 for most connections. So delivered is first scaled. */ - bw = (u64)rs->delivered * BW_UNIT; - do_div(bw, rs->interval_us); + bw = div64_long((u64)rs->delivered * BW_UNIT, rs->interval_us); /* If this sample is application-limited, it is likely to have a very * low delivered count that represents application behavior rather than