Re: [discuss] [patch 1/3] x86_64: Node local pda take 2 -- early cpu_to_node

From: Andi Kleen
Date: Thu Dec 15 2005 - 04:43:42 EST


On Wed, Dec 14, 2005 at 06:33:45PM -0800, Ravikiran G Thirumalai wrote:
> Here is take 2 on x86_64 node local pda allocation.
>
> This patchset does away with the extra memory reference for non CONFIG_NUMA
> case. The early cpu_to_node helps AMD and EM64T systems which work well
> with CONFIG_ACPI_NUMA. cpu_to_node is not inited early for AMD systems
> which work only with old style K8_NUMA. (Tested on EM64 NUMA and Tyan K8
> dual core 4 cpu boxes)

Thanks for now testing on AMD too - that makes me more confident in your
patches.

> Andi, I could not eliminate the need for a initial static pda array, since
> sched_init needs the static per-cpu offset array for NR_CPUS early. Hope
> this is OK.

See my comment.

> + * Setup cpu_to_node using the SRAT lapcis & ACPI MADT table
> + * info.
> + */
> +void __init init_cpu_to_node(void)
> +{
> + int i;
> + for (i = 0; i < NR_CPUS; i++)
> + cpu_to_node[i] = apicid_to_node[x86_cpu_to_apicid[i]];
> +}

I would prefer it if you moved that to numa.c and run always
(even for the k8topology case). Otherwise k8topology will behave
differently whether CONFIG_ACPI_NUMA is set or not, and I don't like
that.

-Andi

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