[RFC][PATCH] start seperating DISCONTIGMEM and NUMA

Dave Hansen haveblue at us.ibm.com
Tue Mar 22 11:00:16 EST 2005


Joel,

I think you're missing one of the main points: you don't have
node-indexed data structures when !CONFIG_NUMA:

> +/* Put things that are common to DISCONTIGMEM and NUMA here */
> +#if (CONFIG_DISCONTIGMEM) || (CONFIG_NUMA)
>  
>  extern struct pglist_data *node_data[];

That should only be '#ifdef CONFIG_NUMA'.

> +#if (CONFIG_DISCONTIGMEM) && (!CONFIG_NUMA)
> +#define NODE_DATA(nid)         (node_data[0])
> +#define pa_to_nid(pa) 0
> +#define pfn_to_nid(pfn) 0
> +#define kvaddr_to_nid(kaddr) 0BTW, the patch I sent 

You don't need this special case.  As I said before, there's no reason
to even have node_data[] when !CONFIG_NUMA, just use contig_page_data.

That should make your patch a ton smaller.

-- Dave




More information about the Linuxppc64-dev mailing list