lkml.org 
[lkml]   [2008]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 08/10] x86: Change NR_CPUS arrays in numa_64 V2
From
Date
travis@sgi.com writes:
> +
> /* Returns the number of the node containing CPU 'cpu' */
> static inline int cpu_to_node(int cpu)
> {
> - return cpu_to_node_map[cpu];
> + u16 *cpu_to_node_map = x86_cpu_to_node_map_early_ptr;
> +
> + if (cpu_to_node_map)
> + return cpu_to_node_map[cpu];
> + else if(per_cpu_offset(cpu))
> + return per_cpu(x86_cpu_to_node_map, cpu);
> + else
> + return NUMA_NO_NODE;

Seems a little big now to be still inlined.

Also I wonder if there are really that many early callers that it
isn't feasible to just convert them to a early_cpu_to_node(). Also
early_cpu_to_node() should really not be speed critical, so just
linearly searching some other table instead of setting up an explicit
array should be fine for that.

-Andi


\
 
 \ /
  Last update: 2008-01-15 11:57    [W:0.227 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site