[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9xcL56hw7nSxiyc@chenyu5-mobl1>
Date: Fri, 3 Feb 2023 08:58:23 +0800
From: Chen Yu <yu.c.chen@...el.com>
To: Yury Norov <yury.norov@...il.com>
CC: <linux-kernel@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Barry Song <baohua@...nel.org>,
Ben Segall <bsegall@...gle.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Gal Pressman <gal@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Haniel Bristot de Oliveira <bristot@...hat.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Ingo Molnar <mingo@...hat.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Jakub Kicinski <kuba@...nel.org>,
Jason Gunthorpe <jgg@...dia.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Juri Lelli <juri.lelli@...hat.com>,
Leon Romanovsky <leonro@...dia.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Peter Lafreniere <peter@...jl.ca>,
Peter Zijlstra <peterz@...radead.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Saeed Mahameed <saeedm@...dia.com>,
Steven Rostedt <rostedt@...dmis.org>,
Tariq Toukan <tariqt@...dia.com>,
Tariq Toukan <ttoukan.linux@...il.com>,
Tony Luck <tony.luck@...el.com>,
Valentin Schneider <vschneid@...hat.com>,
"Vincent Guittot" <vincent.guittot@...aro.org>,
<linux-crypto@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-rdma@...r.kernel.org>
Subject: Re: [PATCH 3/9] sched: add sched_numa_find_nth_cpu()
On 2023-01-20 at 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.
>
> Signed-off-by: Yury Norov <yury.norov@...il.com>
> Acked-by: Tariq Toukan <tariqt@...dia.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> Reviewed-by: Peter Lafreniere <peter@...jl.ca>
> ---
> include/linux/topology.h | 8 ++++++
> kernel/sched/topology.c | 57 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 65 insertions(+)
>
[snip]
> + * sched_numa_find_nth_cpu() - given the NUMA topology, find the Nth next cpu
> + * closest to @cpu from @cpumask.
Just minor question, the @cpu below is used as the index, right? What does "close to @cpu"
mean above?
> + * cpumask: cpumask to find a cpu from
> + * cpu: Nth cpu to find
Maybe also add description for @node?
thanks,
Chenyu
Powered by blists - more mailing lists