Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-09 Thread David Gibson
On Tue, May 09, 2017 at 05:58:29PM +0200, Igor Mammedov wrote: > On Mon, 8 May 2017 15:40:04 +1000 > David Gibson wrote: > > > On Wed, May 03, 2017 at 02:57:17PM +0200, Igor Mammedov wrote: > > > legacy cpu to node mapping is using cpu index values to map > > > VCPU to node with help of '-numa no

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-09 Thread Igor Mammedov
On Mon, 8 May 2017 15:40:04 +1000 David Gibson wrote: > On Wed, May 03, 2017 at 02:57:17PM +0200, Igor Mammedov wrote: > > legacy cpu to node mapping is using cpu index values to map > > VCPU to node with help of '-numa node,nodeid=node,cpus=x[-y]' > > option. However cpu index is internal concep

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-08 Thread Eduardo Habkost
On Mon, May 08, 2017 at 03:40:04PM +1000, David Gibson wrote: > On Wed, May 03, 2017 at 02:57:17PM +0200, Igor Mammedov wrote: > > legacy cpu to node mapping is using cpu index values to map > > VCPU to node with help of '-numa node,nodeid=node,cpus=x[-y]' > > option. However cpu index is internal

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-07 Thread David Gibson
On Wed, May 03, 2017 at 02:57:17PM +0200, Igor Mammedov wrote: > legacy cpu to node mapping is using cpu index values to map > VCPU to node with help of '-numa node,nodeid=node,cpus=x[-y]' > option. However cpu index is internal concept and QEMU users > have to guess /reimplement qemu's logic/ to m

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-04 Thread Igor Mammedov
On Wed, 3 May 2017 14:58:02 -0300 Eduardo Habkost wrote: > On Wed, May 03, 2017 at 02:38:41PM -0300, Eduardo Habkost wrote: > > On Wed, May 03, 2017 at 11:39:10AM -0500, Eric Blake wrote: > > > On 05/03/2017 11:35 AM, Eduardo Habkost wrote: > > > > > > >> + > > > >> +memset(&cpu, 0,

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-03 Thread Eduardo Habkost
On Wed, May 03, 2017 at 02:38:41PM -0300, Eduardo Habkost wrote: > On Wed, May 03, 2017 at 11:39:10AM -0500, Eric Blake wrote: > > On 05/03/2017 11:35 AM, Eduardo Habkost wrote: > > > > >> + > > >> +memset(&cpu, 0, sizeof(cpu)); > > >> +cpu.has_node_id = object->u.cpu.has_node_id;

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-03 Thread Eduardo Habkost
On Wed, May 03, 2017 at 11:39:10AM -0500, Eric Blake wrote: > On 05/03/2017 11:35 AM, Eduardo Habkost wrote: > > >> + > >> +memset(&cpu, 0, sizeof(cpu)); > >> +cpu.has_node_id = object->u.cpu.has_node_id; > >> +cpu.node_id = object->u.cpu.node_id; > >> +cpu.has_sock

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-03 Thread Eric Blake
On 05/03/2017 11:35 AM, Eduardo Habkost wrote: >> + >> +memset(&cpu, 0, sizeof(cpu)); >> +cpu.has_node_id = object->u.cpu.has_node_id; >> +cpu.node_id = object->u.cpu.node_id; >> +cpu.has_socket_id = object->u.cpu.has_socket_id; >> +cpu.socket_id = object->u

Re: [Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-03 Thread Eduardo Habkost
On Wed, May 03, 2017 at 02:57:17PM +0200, Igor Mammedov wrote: [...] > diff --git a/numa.c b/numa.c > index 40e9f44..61521f5 100644 > --- a/numa.c > +++ b/numa.c > @@ -227,6 +227,7 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error > **errp) > NumaOptions *object = NULL; > Mach

[Qemu-devel] [PATCH v2 23/24] numa: add '-numa cpu, ...' option for property based node mapping

2017-05-03 Thread Igor Mammedov
legacy cpu to node mapping is using cpu index values to map VCPU to node with help of '-numa node,nodeid=node,cpus=x[-y]' option. However cpu index is internal concept and QEMU users have to guess /reimplement qemu's logic/ to map it to a concrete cpu socket/core/thread to make sane CPUs placement