lkml.org 
[lkml]   [2014]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/5] sched,numa: classify the NUMA topology of a system
On Wed, Oct 08, 2014 at 03:37:27PM -0400, riel@redhat.com wrote:
> +static void init_numa_topology_type(void)
> +{
> + int a, b, c, n;
> +
> + n = sched_domains_numa_levels;
> +
> + if (n <= 1)
> + sched_numa_topology_type = NUMA_DIRECT;
> +
> + for_each_online_node(a) {
> + for_each_online_node(b) {
> + /* Find two nodes furthest removed from each other. */
> + if (node_hops(a, b) < n)
> + continue;
> +
> + /* Is there an intermediary node between a and b? */
> + for_each_online_node(c) {
> + if (node_hops(a, c) < n &&
> + node_hops(b, c) < n) {
> + sched_numa_topology_type =
> + NUMA_GLUELESS_MESH;
> + return;
> + }
> + }
> +
> + sched_numa_topology_type = NUMA_BACKPLANE;
> + return;
> + }
> + }
> +}

We can find max_distance nodes in sched_init_numa(), right? Could we not
avoid this second iteration?


\
 
 \ /
  Last update: 2014-10-12 17:01    [W:0.100 / U:2.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site