]> xenbits.xensource.com Git - xen.git/commit
x86: fix NUMA handling (c/s 20599:e5a757ce7845)
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 8 Jan 2010 11:22:41 +0000 (11:22 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 8 Jan 2010 11:22:41 +0000 (11:22 +0000)
commit445386cebbf2303c23e06557ef016ccd8fc90cae
tree46a19466a3ba587536ca3894b09eb8650fa14f18
parentb8a5529c455b0d4c8d6cbcc12a1a14daa8613f65
x86: fix NUMA handling (c/s 20599:e5a757ce7845)

c/s 20599 caused the hash shift to become significantly smaller on
systems with an SRAT like this

(XEN) SRAT: Node 0 PXM 0 0-a0000
(XEN) SRAT: Node 0 PXM 0 100000-80000000
(XEN) SRAT: Node 1 PXM 1 80000000-d0000000
(XEN) SRAT: Node 1 PXM 1 100000000-130000000

Comined with the static size of the memnodemap[] array, NUMA got
therefore disabled on such systems. The backport from Linux was really
incomplete, as Linux much earlier had already introduced a dynamcially
allocated memnodemap[].

Further, doing to/from pdx translations on addresses just past a valid
range is not correct, as it may strip/fail to insert non-zero bits in
this case.

Finally, using 63 as the cover-it-all shift value is invalid on 32bit,
since pdx values are unsigned long.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/numa.c
xen/include/asm-x86/numa.h