diff options
Diffstat (limited to 'numa.c')
| -rw-r--r-- | numa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numa.c b/numa.c index e01cb547a2..6fc2393ddd 100644 --- a/numa.c +++ b/numa.c @@ -338,12 +338,12 @@ void parse_numa_opts(MachineClass *mc) if (i == nb_numa_nodes) { uint64_t usedmem = 0; - /* On Linux, each node's border has to be 8MB aligned, - * the final node gets the rest. + /* Align each node according to the alignment + * requirements of the machine class */ for (i = 0; i < nb_numa_nodes - 1; i++) { numa_info[i].node_mem = (ram_size / nb_numa_nodes) & - ~((1 << 23UL) - 1); + ~((1 << mc->numa_mem_align_shift) - 1); usedmem += numa_info[i].node_mem; } numa_info[i].node_mem = ram_size - usedmem; |