]> xenbits.xensource.com Git - xen.git/commit
x86/NUMA: improve memnode_shift calculation for multi node system
authorJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2022 13:16:22 +0000 (15:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Sep 2022 13:16:22 +0000 (15:16 +0200)
commit1666086b00442b23e4fd70f4971e3bcf1a16b124
tree1892f37e88e0948e48ad5c48a831455c81747351
parent38e1276db4c5457cd6e7811b4e168aa85c8a0b06
x86/NUMA: improve memnode_shift calculation for multi node system

SRAT may describe individual nodes using multiple ranges. When they're
adjacent (with or without a gap in between), only the start of the first
such range actually needs accounting for. Furthermore the very first
range doesn't need considering of its start address at all, as it's fine
to associate all lower addresses (with no memory) with that same node.
For this to work, the array of ranges needs to be sorted by address -
adjust logic accordingly in acpi_numa_memory_affinity_init().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/numa.c
xen/arch/x86/srat.c