Re: [PATCH x86/mm UPDATED] x86-64, NUMA: Fix distance table handling

From: Yinghai Lu
Date: Wed Mar 02 2011 - 15:33:50 EST


On 03/02/2011 11:13 AM, Tejun Heo wrote:
> Hello,
>
> On Wed, Mar 02, 2011 at 11:06:41AM -0800, Yinghai Lu wrote:
>>> Hmmm? I can't really follow your sentence. This is init stage.
>>> Anyways, why can't it just walk over the enabled nodes? What would be
>>> the difference?
>>
>> my point is that we really not need to go over it if original is not there.
>
> Oh, you mean if (!phys_dist)? Yeah yeah sure, I was mostly talking
> about allocating new table separately and returning the count and all
> those things. Can you just do the phys_dist testing and going over
> enabled nodes?

why use enabled nodes?

numa_alloc_distance already have calculated. with numa_nodes_parsed and numa_meminfo

/* size the new table and allocate it */
nodes_parsed = numa_nodes_parsed;
numa_nodemask_from_meminfo(&nodes_parsed, &numa_meminfo);

for_each_node_mask(i, nodes_parsed)
cnt = i;
cnt++;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/