Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > smp_parse has a couple problems. First, it should use max_cpus, > not smp_cpus when calculating missing topology information. > Conversely, if maxcpus is not input, then the topology should > dictate max_cpus, as the topology may suppo

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Eduardo Habkost
On Fri, Nov 07, 2014 at 01:23:12PM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:16:06AM -0200, Eduardo Habkost wrote: > > On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > > > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: [...] > > > After talking with Igor,

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:16:06AM -0200, Eduardo Habkost wrote: > On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > > > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > > > > > > > On 07/11/

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Eduardo Habkost
On Fri, Nov 07, 2014 at 12:21:26PM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > > > > On 07/11/2014 10:29, Andrew Jones wrote: > > > >> > I think this would cause too many

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:22:39AM +0100, Andrew Jones wrote: > On Thu, Nov 06, 2014 at 05:17:44PM -0200, Eduardo Habkost wrote: > > On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > > > smp_parse has a couple problems. First, it should use max_cpus, > > > not smp_cpus when calculatin

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:52:31AM +0100, Andrew Jones wrote: > On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > > > > On 07/11/2014 10:29, Andrew Jones wrote: > > >> > I think this would cause too many failures in the wild. Perhaps error > > >> > out if it is lower, and warn

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Fri, Nov 07, 2014 at 10:40:14AM +0100, Paolo Bonzini wrote: > > > On 07/11/2014 10:29, Andrew Jones wrote: > >> > I think this would cause too many failures in the wild. Perhaps error > >> > out if it is lower, and warn if sockets * cores * threads > max_cpus > >> > since we actually allow ho

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 10:29, Andrew Jones wrote: >> > I think this would cause too many failures in the wild. Perhaps error >> > out if it is lower, and warn if sockets * cores * threads > max_cpus >> > since we actually allow hot-plug a thread at a time? > We'd still have more failures if we choose to

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 11:11:30PM +0100, Paolo Bonzini wrote: > > > On 06/11/2014 17:09, Andrew Jones wrote: > > +if (sockets * cores * threads != max_cpus) { > > +fprintf(stderr, "cpu topology: " > > +"sockets (%u) * cores (%u) * threads (%u) != max_cpus

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-07 Thread Andrew Jones
On Thu, Nov 06, 2014 at 05:17:44PM -0200, Eduardo Habkost wrote: > On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > > smp_parse has a couple problems. First, it should use max_cpus, > > not smp_cpus when calculating missing topology information. > > Conversely, if maxcpus is not inpu

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 17:09, Andrew Jones wrote: > +if (sockets * cores * threads != max_cpus) { > +fprintf(stderr, "cpu topology: " > +"sockets (%u) * cores (%u) * threads (%u) != max_cpus > (%u)\n", > +sockets, cores, threads, max_cpus); > +

Re: [Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-06 Thread Eduardo Habkost
On Thu, Nov 06, 2014 at 05:09:35PM +0100, Andrew Jones wrote: > smp_parse has a couple problems. First, it should use max_cpus, > not smp_cpus when calculating missing topology information. > Conversely, if maxcpus is not input, then the topology should > dictate max_cpus, as the topology may suppo

[Qemu-devel] [PATCH] vl: rework smp_parse

2014-11-06 Thread Andrew Jones
smp_parse has a couple problems. First, it should use max_cpus, not smp_cpus when calculating missing topology information. Conversely, if maxcpus is not input, then the topology should dictate max_cpus, as the topology may support more than the input smp_cpus number. Second, smp_parse shouldn't si