From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B677BC43217 for ; Fri, 11 Nov 2022 16:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233982AbiKKQZ7 (ORCPT ); Fri, 11 Nov 2022 11:25:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232979AbiKKQZ6 (ORCPT ); Fri, 11 Nov 2022 11:25:58 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 442D26324; Fri, 11 Nov 2022 08:25:57 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8DD1ECE2843; Fri, 11 Nov 2022 16:25:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76562C433D6; Fri, 11 Nov 2022 16:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668183953; bh=OQ/EpSlHbcD4pnx4y1IaBDrv3gzT9uiG1VObrf/kmUY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CnvaXD8N+0HL+jWFlNDj2BAS3IfMnVYgT6ci+Kz+CdBbnnIz4qjgeBZsYJehB2Izf zaS7Zm/j2r7EpRCmDgzdIR38/PzONJ2wv3G0vhClVLWd3Bt9EFfVRbdyE+ZzOkl6M/ SDxJCmH+UXD976ynQycQFSHvV4wfw/KiKch39tky/7E+zc9hBEcfsl1YsYnIdZrRJL G9B0T5Kw7BJSXwFCSd8kGfuC58NH6hb8dBQabV8x8sgfvUAk5rEIEnOhv6wQTvaPsU jIEYvNHIY9i4FJh74MkGo/BOsjt3NlqISPDMpE7i7Az4Lh254P1iH1cnNvzzboJAeJ 6vIZ3gZSf0sAw== Date: Fri, 11 Nov 2022 08:25:51 -0800 From: Jakub Kicinski To: Yury Norov Cc: linux-kernel@vger.kernel.org, "David S. Miller" , Andy Shevchenko , Barry Song , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Gal Pressman , Greg Kroah-Hartman , Heiko Carstens , Ingo Molnar , Jason Gunthorpe , Jesse Brandeburg , Jonathan Cameron , Juri Lelli , Leon Romanovsky , Mel Gorman , Peter Zijlstra , Rasmus Villemoes , Saeed Mahameed , Steven Rostedt , Tariq Toukan , Tariq Toukan , Tony Luck , Valentin Schneider , Vincent Guittot , linux-crypto@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH 0/4] cpumask: improve on cpumask_local_spread() locality Message-ID: <20221111082551.7e71fbf4@kernel.org> In-Reply-To: <20221111040027.621646-1-yury.norov@gmail.com> References: <20221111040027.621646-1-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 10 Nov 2022 20:00:23 -0800 Yury Norov wrote: > cpumask_local_spread() currently checks local node for presence of i'th > CPU, and then if it finds nothing makes a flat search among all non-local > CPUs. We can do it better by checking CPUs per NUMA hops. Nice. > This series is inspired by Valentin Schneider's "net/mlx5e: Improve remote > NUMA preferences used for the IRQ affinity hints" > > https://patchwork.kernel.org/project/netdevbpf/patch/20220728191203.4055-3-tariqt@nvidia.com/ > > According to Valentin's measurements, for mlx5e: > > Bottleneck in RX side is released, reached linerate (~1.8x speedup). > ~30% less cpu util on TX. > > This patch makes cpumask_local_spread() traversing CPUs based on NUMA > distance, just as well, and I expect comparabale improvement for its > users, as in Valentin's case. > > I tested it on my VM with the following NUMA configuration: nit: the authorship is a bit more complicated, it'd be good to mention Tariq. Both for the code and attribution of the testing / measurements.