Re: [PATCH v2] NUMA x86: add constraints check for nid parameters

From: David Rientjes
Date: Thu Dec 08 2011 - 16:12:50 EST


On Thu, 8 Dec 2011, Andi Kleen wrote:

> > This patch adds constraints checks for numa_set_distance()
> > function. It emits warning when pxms are used uninitialized
> > when parsing the SRAT.
>
> Can you expand on the motivation for this please?

It's adding a debugging check if something erroneously passes a negative
node id when setting a distance, perhaps because of buggy code that failed
to initialize the pxm-to-node mapping correctly which would result in
storing to a negative index of the numa_distance array as indicated in the
changelog. It's for robustness and to warn explicitly rather than
silently rejecting it unless you're monitoring debug output.
--
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/