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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux