Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2232661rwd; Fri, 26 May 2023 03:54:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QwY9cYBP9KGUe2129dUXHdVUQje8Ply8AGKSffdigfRj+w6bmmJYceBK6TTktv7Y7Qnul X-Received: by 2002:a17:90a:9485:b0:255:ae09:1f1f with SMTP id s5-20020a17090a948500b00255ae091f1fmr2020843pjo.21.1685098461701; Fri, 26 May 2023 03:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685098461; cv=none; d=google.com; s=arc-20160816; b=Y/BX3SIlRqBAW5VjMOa4yAyRl/HNpcFxhtUMBeDnhYeVUHdj3q++CbQ169+P5qmuRt vwbk2ae0j2kN6E27t9Dd1AndCQj/HEx2/RjHL9UguNdOd1uQkO15PTgUy+6gr+FXSp5B FjNtsAK2292lFc8MK/2Q1j/jnMRJl1TpGeIxIT+8tNLwk52CbPQ7KqEP91NSUFankfI9 0IBvT5WkLMtKf3LOB7Vm60rR2Nmj6OaTXGtwfmP2r7guL5gPZbR8sFXC55amo9Otv580 6ld5LgYwZ7ncQtra6DGspXJbgQQGdLULR6Akxkc/frFljJ/XdqG1CWBuOAqoORiKrNIZ eCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qsQxO8IPaN8nlkq2Xhl3/vTTB1iuV7FAGBCEMX0YyP4=; b=og5OHe2a4COlKvTDC2/+TVdWRAKyRlkgWO2U47eVrPrcIEAB1bFBzfDsisTdArPNtc PwFVym/1BvJVRW6NKHSefdO1KHH4slubZFZ7/5o54AC450n6UYwsztgtXIEzcHjqmUo/ tvr/mV1/tRz/Hvqn2jg/5a768bIchWulykpjzQFu7HPQOZxy4g1qnOwEeXuD41sCEnLQ ylTO6zY+5CPc0T8zMvzBjvAmocha41vMCGQF8IygQapqAmGVNtCvrC/T6K5Uv05NWQq+ ibeggCtjAYnOaAvDD0a76mTVJBoq09fJ4G0TWfDJ6/0VKhG8GWg0LOVTYmG65fvSuJu7 0LYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20221208.gappssmtp.com header.s=20221208 header.b="a/Dxr0an"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a17090ab38400b0025014cb905esi3707213pjr.126.2023.05.26.03.54.09; Fri, 26 May 2023 03:54:21 -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=@resnulli-us.20221208.gappssmtp.com header.s=20221208 header.b="a/Dxr0an"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbjEZKoM (ORCPT + 99 others); Fri, 26 May 2023 06:44:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbjEZKoK (ORCPT ); Fri, 26 May 2023 06:44:10 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94BF13D for ; Fri, 26 May 2023 03:44:07 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so4213675e9.0 for ; Fri, 26 May 2023 03:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1685097846; x=1687689846; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qsQxO8IPaN8nlkq2Xhl3/vTTB1iuV7FAGBCEMX0YyP4=; b=a/Dxr0an09yn6eTERfXRH+v8faaaU6lJpIpaMVdr8uhHgGPIFcSHLjgyJP0Vs9vG3X CI7CvyUojqeAfJkJ6DzM8lVf+D7nruedj2h/O4/cJ6MP1iQEUxZcP/SUtjVxubwB+PHl OkrRiXzOYbQahNp6wZsjc944QrRWhl9c1yRa+ptE0DNk6jCj+mqRbAh8NRGdWajyTcQv /nMjWZzEDwCU3H/txJSK6o3Zb8IMhF9k44d3DYWlpn7OGbptrtAlsPOKp/PDH+zBorEI FLlQmIKKJOViWnURGXVbGY5pCbOmioounsv+72zQR/DZ5qTYnzkibGOGV2pUPmbH/HzF JnVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685097846; x=1687689846; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qsQxO8IPaN8nlkq2Xhl3/vTTB1iuV7FAGBCEMX0YyP4=; b=XT0TzTHwzCYQeAZuAWCDW+8wEzTpdGo+BQ7DGsb9Ow+V0aJPGBeJUpO8+akI+z82Ks q5zn9lctwM3FU90eEv7XKwS5R6BhggpnSr3jMZS0SAHcC1eDj0yXG+4gFWeBLooy+lZa LtWJHmRg1AMb/ILwEeyZbp1VkzNTMvmA9iStY7a0A6bJoQ8/zteiGY5gHTaPrbf21RR0 oaNNhKcQiwrSiNDoku90kwjLweuBHCBAUmYdZYJNRT21//OmV2WPbmVYeU86zbDKvXpP Rq7sg64IgnJpunxCPBEz6Yn9ILCUhIesiWWtnmug/Z0GLOx+5bxCLDBBYgvodoFTzUAR eFjQ== X-Gm-Message-State: AC+VfDy0yfTX8TUpgjjbqDSmWAI8hXzdrmtP6cQ+vYThKp7Xgr/K7lsv SnhDH+APV9cOxbveIDfdm0P2xg== X-Received: by 2002:a05:600c:2196:b0:3f6:3da:1603 with SMTP id e22-20020a05600c219600b003f603da1603mr1158694wme.26.1685097846338; Fri, 26 May 2023 03:44:06 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id s26-20020a7bc39a000000b003f42328b5d9sm4792425wmj.39.2023.05.26.03.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 03:44:05 -0700 (PDT) Date: Fri, 26 May 2023 12:44:04 +0200 From: Jiri Pirko To: Haiyang Zhang Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, decui@microsoft.com, kys@microsoft.com, paulros@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com, davem@davemloft.net, wei.liu@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, leon@kernel.org, longli@microsoft.com, ssengar@linux.microsoft.com, linux-rdma@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, bpf@vger.kernel.org, ast@kernel.org, sharmaajay@microsoft.com, hawk@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH net] net: mana: Fix perf regression: remove rx_cqes, tx_cqes counters Message-ID: References: <1684963320-25282-1-git-send-email-haiyangz@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1684963320-25282-1-git-send-email-haiyangz@microsoft.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Wed, May 24, 2023 at 11:22:00PM CEST, haiyangz@microsoft.com wrote: >The apc->eth_stats.rx_cqes is one per NIC (vport), and it's on the >frequent and parallel code path of all queues. So, r/w into this >single shared variable by many threads on different CPUs creates a >lot caching and memory overhead, hence perf regression. And, it's >not accurate due to the high volume concurrent r/w. > >Since the error path of mana_poll_rx_cq() already has warnings, so >keeping the counter and convert it to a per-queue variable is not >necessary. So, just remove this counter from this high frequency >code path. > >Also, remove the tx_cqes counter for the same reason. We have >warnings & other counters for errors on that path, and don't need >to count every normal cqe processing. > >Cc: stable@vger.kernel.org >Fixes: bd7fc6e1957c ("net: mana: Add new MANA VF performance counters for easier troubleshooting") >Signed-off-by: Haiyang Zhang Reviewed-by: Jiri Pirko