From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmfrY-0002WH-0N for qemu-devel@nongnu.org; Fri, 07 Nov 2014 04:29:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmfrR-0003ep-Sz for qemu-devel@nongnu.org; Fri, 07 Nov 2014 04:29:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmfrR-0003ea-L8 for qemu-devel@nongnu.org; Fri, 07 Nov 2014 04:29:41 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA79TeO8008809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 7 Nov 2014 04:29:41 -0500 Date: Fri, 7 Nov 2014 10:29:36 +0100 From: Andrew Jones Message-ID: <20141107092935.GB3004@hawk.usersys.redhat.com> References: <1415290175-17314-1-git-send-email-drjones@redhat.com> <545BF212.2090404@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <545BF212.2090404@redhat.com> Subject: Re: [Qemu-devel] [PATCH] vl: rework smp_parse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, ehabkost@redhat.com 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 (%u)\n", > > + sockets, cores, threads, max_cpus); > > + exit(1); > > + } > > 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 error out when it's lower, since we currently silently adjust threads in some of those cases, or just don't care that the topology doesn't support up to maxcpus in other. I'm not sure how best to go about modifying the command line semantics in a backwards compatible way, other than to just create a new "-smp" option. I'm open to all opinions and suggestions. Thanks, drew