Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7199900rwd; Tue, 6 Jun 2023 07:37:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kjkCZ60Lp9oqGYOafbUBB03LW4UKiZvtKeAr2wsjB9ZpHVdqT7pUVoJqE63w+eXtnJ6VR X-Received: by 2002:a05:622a:144b:b0:3f6:a490:49a9 with SMTP id v11-20020a05622a144b00b003f6a49049a9mr1901823qtx.48.1686062235899; Tue, 06 Jun 2023 07:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686062235; cv=none; d=google.com; s=arc-20160816; b=gWY92LhU0bloyEu3s0gR4EMDmXJZaT3mCRPKsfCUN4JqTe9xLYiLVICl/6Msb6dxwb wB3vpnbb8W/252rM7wSu/V6own9t/I/Wz1xiEObmYjqDi1x7SWwQ7m8mM0Gi340hbE9Q 6YcuryD3/yhttwOZRu3ykMsb4USS6NkyBDvV2bVMU4rUnA0dhGq0EspkkvB+QvpEdslC zWARy7d1bv7qz1H9DSpXWcQ3Fyl2scqRxeTyb9JDBCnEnWUrBpA5LnC7yYYywVT4LUk4 0yz7C1VQB529P/arIexkt5VxvLmMN/uwNMdZv0DlwML6owVMd81SZY96D7vUv4ioCcMr JvPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/hmEz2MbCDzEXdAiTp6Aa2zyFmyqIvzUtehqc+a8JQM=; b=mP8jMFacUdpnF91kUl8NeS30oPf4N0+MuKzlWPUnurQ9qkQSb9YgS6r551mQeTGJuG 1yQsN/mHYGKNudzmN97JHWnV/Ou99AYL7WCBzUFUCCG4Ks+cm7Xqypx1k34sC+DngrMx S+Rd7YTcU+9OYIvBAl2CkLzbonxKzcWjTrHpLQ2eAxdiioknNxcUq/VVlPNlVu3YfZlc xGK+VSZJNfD0/4ly8e+cSYin17924H38J3rD8xWEsmLfl1zTH6XoUWZuw8OsSyDeCDN2 P7Z5fIWNtxqcYX8JItcVjPolh/vq6y1QlPnRN7Yq0Jz5i4MihTZDKbtyoQqOPdz170EH CO1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AgA8yJ2q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a05622a11c300b003f6be1e8602si6373450qtk.11.2023.06.06.07.37.01; Tue, 06 Jun 2023 07:37:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=AgA8yJ2q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236765AbjFFOZ6 (ORCPT + 99 others); Tue, 6 Jun 2023 10:25:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234231AbjFFOZ5 (ORCPT ); Tue, 6 Jun 2023 10:25:57 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187E8199D; Tue, 6 Jun 2023 07:25:25 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1b04949e5baso54248645ad.0; Tue, 06 Jun 2023 07:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686061524; x=1688653524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/hmEz2MbCDzEXdAiTp6Aa2zyFmyqIvzUtehqc+a8JQM=; b=AgA8yJ2qSN0nKfzypklbbkOnFwubsWwLlNS1zuBDIfsGWUgRPxp4sXVz1ygkD7cM6T GcGX5fRp3+VQuDz3BG2Z8y3FcONjfMHDwCuxcO+jSaiOomqg5evWMmSjJcP/pA/N6yWY +iF9llU8Pu4KC8a/xjGJ7TsC0+wzeHpbwFjgHz2Rd38ed28bikd2JPt3KQE8LmWPb/7R xEY6cFSWXiYrvds/eg/8asRjB1q2dSwh4eupWCLOphNRJHKS5rJknVahnHLHZNQnQctd cxOzs0SkFVq7yEbHlsVMXSaYF+rU1vxQGuD04MkqqH1ZNTrERJtcPlLTonlhI/AKNzS/ c0sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061524; x=1688653524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/hmEz2MbCDzEXdAiTp6Aa2zyFmyqIvzUtehqc+a8JQM=; b=c4Rs0+56tv4YIHuOsjq2+/Az/GjmB+k+xCH3Df8QDpN3qGg4gBeQkGltuSDcdmnzkW aou/u+PnjsE1PZXCHx8vAKJd5ywz4pAGjA+q/hS09MqGbUuXZDWEBiDbBSjblkIJly7n s7aToYggg4hmFcHP4X5DTJ3l/QcSPqTlV4Smzd5PeMT13b1XA7+xgE9tMmDsxDNKXi6Y dESmcsb8jFGXM7HNVMGs8WvoC8YO1Q/p3s+1BTY/quaRT8yf6/R/nb+O9t/fCa+1NT1x 2ESnfRTZLwpxhKIBsQvI7vLuqwq6Dl61+YjSoKvEcQQG/h0Wy46l4cC34zE/Zcf+UemU EBPQ== X-Gm-Message-State: AC+VfDzAOg+uFSFFMcffzDhHgS8e43cZHvr2oZpcLJT6Wkl/7ALrPZyu NSOBOBo4LnGmxN8bCbxRKmG3zvnrnIOct4Vrfyk= X-Received: by 2002:a17:902:e5cd:b0:1b2:28ca:d16 with SMTP id u13-20020a170902e5cd00b001b228ca0d16mr2457853plf.44.1686061524285; Tue, 06 Jun 2023 07:25:24 -0700 (PDT) MIME-Version: 1.0 References: <20230525125746.553874-1-aleksander.lobakin@intel.com> <20230525125746.553874-4-aleksander.lobakin@intel.com> <8828262f1c238ab28be9ec87a7701acd791af926.camel@gmail.com> <5aac6822-6fe5-e182-935e-7aa86f1e820d@intel.com> In-Reply-To: <5aac6822-6fe5-e182-935e-7aa86f1e820d@intel.com> From: Alexander Duyck Date: Tue, 6 Jun 2023 07:24:47 -0700 Message-ID: Subject: Re: [Intel-wired-lan] [PATCH net-next v2 03/12] iavf: optimize Rx buffer allocation a bunch To: Alexander Lobakin Cc: Paul Menzel , Jesper Dangaard Brouer , Larysa Zaremba , netdev@vger.kernel.org, Ilias Apalodimas , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Michal Kubiak , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , Paolo Abeni , Christoph Hellwig , Magnus Karlsson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 6, 2023 at 5:49=E2=80=AFAM Alexander Lobakin wrote: > > From: Alexander Duyck > Date: Fri, 2 Jun 2023 10:50:02 -0700 > > Sorry for the silence, had sorta long weekend :p > > > On Fri, Jun 2, 2023 at 9:16=E2=80=AFAM Alexander Lobakin > > wrote: > [...] > > The other thing is you may want to double check CPU(s) you are > > expected to support as last I knew switch statements were still > > expensive due to all the old spectre/meltdown workarounds. > Wait, are switch-cases also affected? I wasn't aware of that. For sure I > didn't even consider using ops/indirect calls, but switch-cases... I saw > lots o'times people replacing indirections with switch-cases, what's the > point otherwise :D > > Thanks, > Olek I think it all depends on how the compiler implements them. I know switch cases used to be done as indirections in some cases. It is possible they did away with that in the compilers some time ago or came up with a fix to work around them. I just remember back when that came up people were going through and replacing switch cases with if/else blocks in the case of performance sensitive workloads. Odds are there have been workarounds added to address that, but it is just something to be aware of. Thanks, - Alex