When there are more nodes than memory available to put the minimum allowed memory by node, all the memory is put on the last node.
This series introduces a new MachineState function to distribute equally the memory across the nodes without breaking compatibility with previous machine types. The new function uses an error diffusion algorithm to distribute the memory across the nodes. As the memory alignment for pseries is 256MB and for the others is only 8MB, we introduce this change only for pseries-2.10 Laurent Vivier (2): numa: introduce numa_auto_assign_ram() function in MachineClass numa,spapr: equally distribute memory on nodes hw/ppc/spapr.c | 21 ++++++++++++++++++++- include/hw/boards.h | 2 ++ include/hw/ppc/spapr.h | 3 ++- numa.c | 44 +++++++++++++++++++++++++++++++++----------- 4 files changed, 57 insertions(+), 13 deletions(-) -- 2.9.3