From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQJI6-0006Zl-5E for qemu-devel@nongnu.org; Thu, 11 Apr 2013 11:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQJI4-0000Ru-3Z for qemu-devel@nongnu.org; Thu, 11 Apr 2013 11:19:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQJI3-0000Rj-Or for qemu-devel@nongnu.org; Thu, 11 Apr 2013 11:19:55 -0400 Date: Thu, 11 Apr 2013 17:17:29 +0200 From: Igor Mammedov Message-ID: <20130411171729.2fb431cc@thinkpad> In-Reply-To: <20130405172435.GD6862@otherpad.lan.raisama.net> References: <1365172636-28628-1-git-send-email-imammedo@redhat.com> <1365172636-28628-25-git-send-email-imammedo@redhat.com> <20130405171054.GA2719@otherpad.lan.raisama.net> <20130405172435.GD6862@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, pbonzini@redhat.com, afaerber@suse.de, lig.fnst@cn.fujitsu.com, rth@twiddle.net On Fri, 5 Apr 2013 14:24:35 -0300 Eduardo Habkost wrote: > On Fri, Apr 05, 2013 at 02:10:54PM -0300, Eduardo Habkost wrote: > > On Fri, Apr 05, 2013 at 04:37:16PM +0200, Igor Mammedov wrote: > > [...] > > > diff --git a/qapi-schema.json b/qapi-schema.json > > > index db542f6..a760ed5 100644 > > > --- a/qapi-schema.json > > > +++ b/qapi-schema.json > > > @@ -1387,6 +1387,17 @@ > > > { 'command': 'cpu', 'data': {'index': 'int'} } > > > > > > ## > > > +# @cpu-add > > > +# > > > +# Adds CPU with specified id > > > +# > > > +# @id: cpu id of CPU to be created > > > > Can we have the semantics/constraints of "id" documented here? Is it an > > arbitrary ID chosen by the caller? Does it have to be the APIC ID? Does > > it have to be the index of the CPU in the CPU list? How the IDs of > > existing CPUs set using "-smp" are allocated? > > > > I am looking at the code right now to understand how this implementation > > works, but the documentation could contain or point to documentation on > > how the "id" parameter is used and interpreted. > > So, the answer to my own question seems to be on patch 21/22. Let me > check if I understand this correctly: > > @id: cpu id of the CPU to be created. It must be one of the the > available IDs listed at the "/machine/icc-bridge/cpu[0..N]" links. > > Is the above correct? yes. > > Now, my question is: suppose a caller starts QEMU as: > > $ qemu -smp 18,cores=3,threads=3,maxcpus=36 \ > -numa node,cpus=0-8 -numa node,cpus=9-17 \ > -numa node,cpus=18-26 -numa node,cpus=27-35 > > and the caller wants to hot-add all VCPUs in the last CPU socket (that > means: all the VCPUs in the last NUMA node, that means: CPU indexes > 27-35). What should the caller do to find out which of the > /machine/icc-bridge/cpu[0..N] links/IDs really correspond to those > VCPUs? If one wants plug in a specific CPU, It won't work with -numa yet. to make it work we need to specify sockets on -numa cmd. line and then construct synthetic QOM containers tree that could looklike: /machine/numa_nodes/[0..N]/sockets/[0..M]/cpus/[0..X] then command line could look like: $ qemu -smp 18,cores=3,threads=3,maxcpus=36 \ -numa node,sockets=0-1 -numa node,sockets=2-3 > > > > > > > +# > > > +# Returns: Nothing on success > > > +## > > > +{ 'command': 'cpu-add', 'data': {'id': 'int'} } > > > + > > > +## > > -- > > Eduardo > > > > -- > Eduardo > -- Regards, Igor