[2/4] [RFC] ppc64 early_pfn_to_nid stop using numa_memory_lookup
mike kravetz
kravetz at us.ibm.com
Fri May 20 07:50:48 EST 2005
On Thu, May 19, 2005 at 05:45:23PM +0100, Andy Whitcroft wrote:
> +/* Find the owning node for a pfn. */
> +int early_pfn_to_nid(unsigned long pfn)
> +{
> + int nid;
> +
> + for (nid = 0; nid < MAX_NUMNODES &&
> + init_node_data[nid].node_end_pfn; nid++) {
> + unsigned long start = init_node_data[nid].node_start_pfn;
> + unsigned long end = init_node_data[nid].node_end_pfn;
> + if (start <= pfn && pfn <= end)
> + return nid;
> + }
> +
> + return 0;
> +}
Can't do this. Remember the 'swiss cheese' POWER numa model?
init_node_data represents the 'range' of valid pfn's on a given
node. These ranges may overlap. So, a given pfn may fall into
the range of multiple nodes as represented by init_node_data.
init_node_data is mostly used to 'prime' the zone initialization
code. Currently, numa_memory_lookup_table is the only structure
properly initialized/created to do pfn_to_nid lookups.
--
Mike
More information about the Linuxppc64-dev
mailing list