Re: [Qemu-devel] [PATCH v4 1/1] numa: equally distribute memory on nodes

2017-05-02 Thread Laurent Vivier
On 02/05/2017 22:09, Eduardo Habkost wrote: > On Tue, May 02, 2017 at 06:29:55PM +0200, Laurent Vivier wrote: > [...] >> diff --git a/numa.c b/numa.c >> index 6fc2393..750fd95 100644 >> --- a/numa.c >> +++ b/numa.c >> @@ -294,6 +294,42 @@ static void validate_numa_cpus(void) >> g_free(seen_cpu

Re: [Qemu-devel] [PATCH v4 1/1] numa: equally distribute memory on nodes

2017-05-02 Thread Eduardo Habkost
On Tue, May 02, 2017 at 06:29:55PM +0200, Laurent Vivier wrote: [...] > diff --git a/numa.c b/numa.c > index 6fc2393..750fd95 100644 > --- a/numa.c > +++ b/numa.c > @@ -294,6 +294,42 @@ static void validate_numa_cpus(void) > g_free(seen_cpus); > } > > +void numa_legacy_auto_assign_ram(Machi

[Qemu-devel] [PATCH v4 1/1] numa: equally distribute memory on nodes

2017-05-02 Thread Laurent Vivier
When there are more nodes than available memory to put the minimum allowed memory by node, all the memory is put on the last node. This is because we put (ram_size / nb_numa_nodes) & ~((1 << mc->numa_mem_align_shift) - 1); on each node, and in this case the value is 0. This is particularly true wi