Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3124000pxf; Mon, 15 Mar 2021 01:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBKCMDME+tOZEnWLnQMJmHB3sE7zIGHrXuL49qo5e+SXCZBICBjomzKxmPZEBe/3gnnxLI X-Received: by 2002:a05:6402:1d19:: with SMTP id dg25mr28726985edb.218.1615798378244; Mon, 15 Mar 2021 01:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615798378; cv=none; d=google.com; s=arc-20160816; b=pc2Wi8JN+ZP/rMSFSegsukMNvDioCYWeZcYCpSRWNsxG6rG617xWNj88VguWLe9tCo wrfxj+Dodd4c1o6grgXIvW0uvG2K4ZvEnIHDBIwN7icfuHU1Lw/c7gEq/9dTegbJHnBb rJdt8hoBRR9/x3h1thOZt2BRafqoglEh/u8VYcZ9XI+tYybDVkGLE5Yl4CkoEWn/tYck VJlRBClBBUZsVS7KmalzY2x7BQcU2jFKG8IdsIdrN8fXPxssSvLfg1jDFBxF2TG4hYgE d9Q9p/lVpBDPaY1zRcWJXuFRVCKAk3ZBLE/F2nu3P3QpQVkxIdPEVPx0lj9Kogmcb7ZU vdVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l2O57MtvjdnNHzD4neH/h5doFZculQvdjShG/AZS2Og=; b=Zmd5zkLiKXWYHm1fglblTLGnVRC8QHD23/Aw+6IU+Ukc5LciLtLEWyF9UxxrB+d+89 so4Li7svsZK4RGIsBUgRknpXMg7LmDfMRYfaZOVKzLsW9HJWb/gsb6MBfyZVod+xUQ2p qf702pyBymWxi/UY4XUV4KDx20EPGjbRFW2l2i4CiY0xSofd8NzoYSjDQwcwZ/sIt1Cm woVhACaEmYj3wGvoXD29oJUZeG+gGfWINoERDsLPgnC2AOHT/hdjc0HlLXeAF3S6YH+V q2Cu5nj9qKdmB4zw30caP0EHVe9KexwGQhLxYdHbsGf01GMvYyTVnsNmOieH7XxjGJOJ 736Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gDgsw7Tb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m22si10154551ejr.463.2021.03.15.01.52.36; Mon, 15 Mar 2021 01:52:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gDgsw7Tb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229558AbhCOIv1 (ORCPT + 99 others); Mon, 15 Mar 2021 04:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhCOIux (ORCPT ); Mon, 15 Mar 2021 04:50:53 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFA0CC06175F for ; Mon, 15 Mar 2021 01:50:53 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id n195so32384815ybg.9 for ; Mon, 15 Mar 2021 01:50:53 -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=l2O57MtvjdnNHzD4neH/h5doFZculQvdjShG/AZS2Og=; b=gDgsw7Tb+HXOoQEbpVhgQqfXspgXmqQAu7boGHprky98IHo5PPEuLyFlvAs+XLWYUG mhPP9g52vYZAFJzLW+7WWPCHmxYWIGW1s160NRYEacH7nTzt7rDjj6BoZDhDps39dadM D9rHMNEb9UYM8oTyed4XYSdDOIKVbi6I4Tatk+yue0NYH3SZDyaUNFkcrgyUkxmPLt00 B26JIteFm+7TPWv5LmfQ12dT59Z+FAfdlXURaLTrQJqc16/G+noKPAno75JsWSSoj7Ur SH0AharqhZ2LdGwf264H4JKwTGlqs4yZX5m9O7iAr5m3qOy3av78iYFeBnUofs9cDcg0 tiFg== 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=l2O57MtvjdnNHzD4neH/h5doFZculQvdjShG/AZS2Og=; b=b5yQOP6gRYQEU/sRbvqimtQCjF4M1I1AsxJkrbvJQryvGZedPLruZq1jZqK1S9I/3n rT7z9wxMYcmuL0rG7PEP147j7pbFYMRH2U8rsTR7nM4ate5OlV/jYQrozFTtzFQgHcCv QCuyMIT/mkTJns7BbjZgulp0/s0YgmgNtZszUrugVvvVluB9XniVtlkBIUN9DHhwTcnH pKpKdPIzwCS86qeS3+hr16TMeU0PEUwWfcJKPBd5AWkgK2YFj4DzJxwPbx6RkSjYzKRa u2E5vHoZASUozPWvgXumAtYD/9jPFDJLYRvNtn06Ergp2PLShYcYWyVFuTxFMu3ivbBr 7QUg== X-Gm-Message-State: AOAM530BHUhU8OCiOgHR6j1ajuKVUp3CIrt1ji/IJeFvTDBn5YNfZ67R wDxA9ySAWnmusm2RzVmPGWCL4tCN1nd8e8CDfpr6CA== X-Received: by 2002:a25:1d88:: with SMTP id d130mr36556088ybd.446.1615798252202; Mon, 15 Mar 2021 01:50:52 -0700 (PDT) MIME-Version: 1.0 References: <20210313202946.59729-1-alobakin@pm.me> In-Reply-To: <20210313202946.59729-1-alobakin@pm.me> From: Eric Dumazet Date: Mon, 15 Mar 2021 09:50:40 +0100 Message-ID: Subject: Re: [PATCH v2 net-next 0/3] gro: micro-optimize dev_gro_receive() To: Alexander Lobakin Cc: "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Wei Wang , Cong Wang , Taehee Yoo , netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 13, 2021 at 9:30 PM Alexander Lobakin wrote: > > This random series addresses some of suboptimal constructions used > in the main GRO entry point. > The main body is gro_list_prepare() simplification and pointer usage > optimization in dev_gro_receive() itself. Being mostly cosmetic, it > gives like +10 Mbps on my setup to both TCP and UDP (both single- and > multi-flow). > > Since v1 [0]: > - drop the replacement of bucket index calculation with > reciprocal_scale() since it makes absolutely no sense (Eric); > - improve stack usage in dev_gro_receive() (Eric); > - reverse the order of patches to avoid changes superseding. > > [0] https://lore.kernel.org/netdev/20210312162127.239795-1-alobakin@pm.me > SGTM, thanks. Reviewed-by: Eric Dumazet