From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agl6j-0001cB-Hv for qemu-devel@nongnu.org; Thu, 17 Mar 2016 23:29:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agl6g-00019x-9Z for qemu-devel@nongnu.org; Thu, 17 Mar 2016 23:29:49 -0400 Received: from e28smtp04.in.ibm.com ([125.16.236.4]:45442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agl6f-00019T-KD for qemu-devel@nongnu.org; Thu, 17 Mar 2016 23:29:46 -0400 Received: from localhost by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Mar 2016 08:59:41 +0530 Date: Fri, 18 Mar 2016 08:59:32 +0530 From: Bharata B Rao Message-ID: <20160318032932.GA20937@in.ibm.com> References: <1457672078-17307-1-git-send-email-bharata@linux.vnet.ibm.com> <20160314104728.5ff09f86@nial.brq.redhat.com> <20160316034803.GC13176@in.ibm.com> <20160316164850.2c3420db@nial.brq.redhat.com> <20160317100343.GT9032@voom> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160317100343.GT9032@voom> Subject: Re: [Qemu-devel] [RFC PATCH v2 0/9] Core based CPU hotplug for PowerPC sPAPR Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: mjrosato@linux.vnet.ibm.com, thuth@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, aik@ozlabs.ru, armbru@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, qemu-ppc@nongnu.org, pbonzini@redhat.com, Igor Mammedov , afaerber@suse.de, mdroth@linux.vnet.ibm.com On Thu, Mar 17, 2016 at 09:03:43PM +1100, David Gibson wrote: > On Wed, Mar 16, 2016 at 04:48:50PM +0100, Igor Mammedov wrote: > > On Wed, 16 Mar 2016 09:18:03 +0530 > > Bharata B Rao wrote: > > > > > On Mon, Mar 14, 2016 at 10:47:28AM +0100, Igor Mammedov wrote: > > > > On Fri, 11 Mar 2016 10:24:29 +0530 > > > > Bharata B Rao wrote: > > > > > > > > > Hi, > > > > > > > > > > This is the next version of "Core based CPU hotplug for PowerPC sPAPR" that > > > > > was posted at > > > > > https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00081.html > > > > > > > > > > device_add semantics > > > > > -------------------- > > > > > For -smp 16,sockets=1,cores=2,threads=8,maxcpus=32 > > > > > (qemu) device_add spapr-cpu-core,id=core2,core=16,cpu_model=host[,threads=8] > > > > do you plan to allow user to hotplug different cpu_models? > > > > If not it would be better to hide cpu_model from user > > > > and set it from machine pre_plug handler. > > > > > > In my earlier implementations I derived cpu model from -cpu and threads from > > > -smp,threads= commandline options and never exposed them to device_add > > > command. > > > > > > Though we don't support heterogenous systems (different cpu models and/or > > > threads) now, it was felt that it should be easy enough to support such > > > systems if required in future, that's how cpu_model and threads became > > > options for device_add. > > > > > > One of the things that David felt was missing from my earlier QMP query > > > command (and which is true in your QMP query implementation also) is that > > > we aren't exporting cpu_model at all, at least for not-yet-plugged cores. > > > So should we include that or let management figure that out since it > > > would already know about the CPU model. > > 1. > > so since you are not planning supporting heterogeneous setup yet, > > I'd suggest to refrain from making user to provide cpu_model at > > device_add time. Instead make machine code to set it for cores it > > creates before core.realize() (yet another use for pre_plug()). > > > > That way mgmt doesn't have to figure out what cpu_model to set at > > device_add time and doesn't have find out what property to use for it. > > Yes.. of course you could also do the same thing for nr_threads, so > I'm wondering whether there's a good argument to keep one in > pre_plug() and one in query-hotpluggable-cpus. Right, so what should be the way forward ? Should we keep cpu_model= and threads= options with device_add or just threads= or neither ? Regards, Bharata.