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 EBA55C761AF for ; Mon, 27 Mar 2023 10:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233764AbjC0K3R (ORCPT ); Mon, 27 Mar 2023 06:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233700AbjC0K2y (ORCPT ); Mon, 27 Mar 2023 06:28:54 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 335836A7D; Mon, 27 Mar 2023 03:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679912907; x=1711448907; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ezCh01c1kVevA4lZGyADwIi6B7zornrw82CM0FaX2dM=; b=DlwCmmrMibCRSkstjsfjnNpa6Cwin1gRCftBUSiK7cTHNtJ+W33SXsgN 7COeSO8UoNvsRBnmvBS9uXeEeGzaPWQ9lJzDai64sNa5sku7+OVJMtGcr XTxR1AMD8bYu88xS+2Iw8ziEEZtFrOvsYs1fJ/NXULzgCOFCAEsKn6lXE FSYgK9JsOLOCyni8qdceRCmx/AOlL/tZnfCH+naiot0KEb1ng8NAeASUK 0XVUAnci3O4GfMt8pI1Fo0Nepqya6bYDqyvEgKtg8ml482qTxc5Ct9F4F P+hzHpxJhejC0h+NSkybEnvO1kNunwxI9gk3h3omnRk4D0g7ZNcdLISp0 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10661"; a="319887069" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="319887069" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 03:28:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10661"; a="747949267" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="747949267" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP; 27 Mar 2023 03:28:15 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pgk5E-009AxP-1y; Mon, 27 Mar 2023 13:28:12 +0300 Date: Mon, 27 Mar 2023 13:28:12 +0300 From: Andy Shevchenko To: Yury Norov Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Saeed Mahameed , Pawel Chmielewski , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Paolo Abeni , Rasmus Villemoes , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Tariq Toukan , Gal Pressman , Greg Kroah-Hartman , Heiko Carstens , Barry Song Subject: Re: [PATCH 2/8] sched/topology: introduce sched_numa_find_next_cpu() Message-ID: References: <20230325185514.425745-1-yury.norov@gmail.com> <20230325185514.425745-3-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230325185514.425745-3-yury.norov@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 25, 2023 at 11:55:08AM -0700, Yury Norov wrote: > The function searches for the next CPU in a given cpumask according to > NUMA topology, so that it traverses cpus per-hop. > > If the CPU is the last cpu in a given hop, sched_numa_find_next_cpu() > switches to the next hop, and picks the first CPU from there, excluding > those already traversed. ... > +/* Hmm... Is it deliberately not a kernel doc? > + * sched_numa_find_next_cpu() - given the NUMA topology, find the next cpu > + * cpumask: cpumask to find a cpu from > + * cpu: current cpu > + * node: local node > + * hop: (in/out) indicates distance order of current CPU to a local node > + * > + * The function searches for next cpu at a given NUMA distance, indicated > + * by hop, and if nothing found, tries to find CPUs at a greater distance, > + * starting from the beginning. > + * > + * returns: cpu, or >= nr_cpu_ids when nothing found. > + */ -- With Best Regards, Andy Shevchenko