Re: [PATCH 2/8] numa: x86_64: use generic percpu var numa_node_id() implementation

Christoph Lameter <[email protected]>
Newsgroups org.kernel.vger.linux-numa,org.kvack.linux-mm
Message-ID <[email protected]>
On Fri, 30 Apr 2010, Tejun Heo wrote:

> Hello,
>
> On 04/29/2010 06:56 PM, Lee Schermerhorn wrote:
> > Tejun:  do you mean:
> >
> > #ifdef CONFIG_NUMA
> >         if (cpu != 0 && percpu_read(numa_node) == 0 &&
> > ........................^ here?
> >             early_cpu_to_node(cpu) != NUMA_NO_NODE)
> >                 set_numa_node(early_cpu_to_node(cpu));
> > #endif
> >
> > Looks like 'numa_node_id()' would work there.
>
> Yeah, it just looked weird to use raw variable when an access wrapper
> is there.
>
> > But, I wonder what the "cpu != 0 && percpu_read(numa_node) == 0" is
> > trying to do?
>
> That I have don't have any clue about.  :-)

I guess that cpu 0 is used for booting and its initialized early when
certain functionality is not available yet.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.