Re: [PATCH 3/3] x86: fix node_possible_map logic -v2

From: David Rientjes
Date: Mon May 11 2009 - 18:56:56 EST


On Mon, 11 May 2009, Jack Steiner wrote:

> Cpus also belong to nodes. The cpu_to_node_map[] provides the mapping.
> I have not tried it, but I wonder what happens if you offline all of the
> memory of a node (probably not possible so this may be hypothetical for now).
> Should offlining all node memory change the node that a cpu on the node
> are associated with? That does not seem right.
>

No, it would simply become a memoryless node and NODE_DATA() should
probably be freed or just represent spanned_pages of 0.

Memoryless node support has already been merged (and needs to be fixed),
but the same toplogies could be represented with memory-only nodes which
may have been a better approach considering your point about memory
offline and our lack of node hot-remove.

> Agree. FWIW, it works ok in 2.6.27. I need to bisect to find where the regression
> occurred.
>

I'm not so sure it will help to identify which patch caused the issue, it
depends on whether we want to support memoryless nodes or not and then
address the issues as they arise when there is no memory attached, which
you've done in this case.

We can fix your particular issue by deciding how node_online_map and its
superset, node_possible_map, are handled for memoryless nodes. Such users
need to iterate over N_NORMAL_MEMORY instead.
--
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/