Re: NUMA aware slab allocator V3

From: Dave Hansen
Date: Mon May 16 2005 - 08:56:26 EST


On Fri, 2005-05-13 at 18:24 -0700, Christoph Lameter wrote:
> /*
> + * Some Linux kernels currently have weird notions of NUMA. Make sure that
> + * there is only a single node if CONFIG_NUMA is not set. Remove this check
> + * after the situation has stabilized.
> + */
> +#ifndef CONFIG_NUMA
> +#if MAX_NUMNODES != 1
> +#error "Broken Configuration: CONFIG_NUMA not set but MAX_NUMNODES !=1 !!"
> +#endif
> +#endif

There are some broken assumptions in the kernel that
CONFIG_DISCONTIG==CONFIG_NUMA. These usually manifest when code assumes
that one pg_data_t means one NUMA node.

However, NUMA node ids are actually distinct from "discontigmem nodes".
A "discontigmem node" is just one physically contiguous area of memory,
thus one pg_data_t. Some (non-NUMA) Mac G5's have a gap in their
address space, so they get two discontigmem nodes.

So, that #error is bogus. It's perfectly valid to have multiple
discontigmem nodes, when the number of NUMA nodes is 1. MAX_NUMNODES
refers to discontigmem nodes, not NUMA nodes.

In current -mm, you can use CONFIG_NEED_MULTIPLE_NODES to mean 'NUMA ||
DISCONTIG'.

-- Dave

-
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/