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 270B2C636CC for ; Tue, 7 Feb 2023 05:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjBGFKs (ORCPT ); Tue, 7 Feb 2023 00:10:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbjBGFKM (ORCPT ); Tue, 7 Feb 2023 00:10:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B77A1E5D2; Mon, 6 Feb 2023 21:09:49 -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 ams.source.kernel.org (Postfix) with ESMTPS id A897BB816D5; Tue, 7 Feb 2023 05:09:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07DFDC433D2; Tue, 7 Feb 2023 05:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675746586; bh=3LepokumWhsUfcne4ek1k9dUXAWx6TVmsA0QwbcNahI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Rps20H7gpxHZwRFmaICD5lE3X/hCpzp0GCH5RNI99H2bEh28AQqc09qVX4t+6TeT5 KPqk1Fp0d4bx634U2129pxvgrVaoc1RQuogI98WcEPu0goQgpaqliXOCn6kyuv6Z7o /lySGAv5Sdm1lmhLMTOEn3xdPn5MKk0IsSDO/jT2cEsM0S4MgOnzVDuN9ydMpGGA/Q hR9lfyDWTjhUogG0vtQQ2FzGrMApoIanAWnGzCdDq1yHwoVqPB6xgRBIV8yfCYnnFb VvroBOcsQ4SOxTbIyWGqKwSdyz9hwo+TuRua6HWHYix5cun28O+dPf/3gCqq2p2sKU DIKBN0Pw0wodQ== Date: Mon, 6 Feb 2023 21:09:43 -0800 From: Jakub Kicinski To: Valentin Schneider Cc: Yury Norov , linux-kernel@vger.kernel.org, "David S. Miller" , Andy Shevchenko , Barry Song , Ben Segall , Dietmar Eggemann , Gal Pressman , Greg Kroah-Hartman , Haniel Bristot de Oliveira , Heiko Carstens , Ingo Molnar , Jacob Keller , Jason Gunthorpe , Jesse Brandeburg , Jonathan Cameron , Juri Lelli , Leon Romanovsky , Linus Torvalds , Mel Gorman , Peter Lafreniere , Peter Zijlstra , Rasmus Villemoes , Saeed Mahameed , Steven Rostedt , Tariq Toukan , Tariq Toukan , Tony Luck , Vincent Guittot , linux-crypto@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH 3/9] sched: add sched_numa_find_nth_cpu() Message-ID: <20230206210943.79e01af9@kernel.org> In-Reply-To: <20230121042436.2661843-4-yury.norov@gmail.com> References: <20230121042436.2661843-1-yury.norov@gmail.com> <20230121042436.2661843-4-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: linux-crypto@vger.kernel.org On Fri, 20 Jan 2023 20:24:30 -0800 Yury Norov wrote: > The function finds Nth set CPU in a given cpumask starting from a given > node. > > Leveraging the fact that each hop in sched_domains_numa_masks includes the > same or greater number of CPUs than the previous one, we can use binary > search on hops instead of linear walk, which makes the overall complexity > of O(log n) in terms of number of cpumask_weight() calls. Valentin, would you be willing to give us a SoB or Review tag for this one? We'd like to take the whole series via networking, if that's okay.