lkml.org 
[lkml]   [2023]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] sched/topology: introduce sched_numa_find_next_cpu()
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


\
 
 \ /
  Last update: 2023-03-27 12:30    [W:0.092 / U:2.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site