From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUg0R-0001tk-Ot for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:23:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUg0Q-0008DH-9n for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:23:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUg0Q-0008DB-0C for qemu-devel@nongnu.org; Tue, 23 Apr 2013 12:23:46 -0400 Message-ID: <5176B40C.5010405@redhat.com> Date: Tue, 23 Apr 2013 10:17:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366063976-4909-1-git-send-email-imammedo@redhat.com> <1366063976-4909-17-git-send-email-imammedo@redhat.com> <516C7D1F.2020606@redhat.com> <20130416220432.63c191d6@thinkpad> In-Reply-To: <20130416220432.63c191d6@thinkpad> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2TTBDSQJJDHPPPRVNXHSR" Subject: Re: [Qemu-devel] [PATCH 16/16] 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: Igor Mammedov Cc: aliguori@us.ibm.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TTBDSQJJDHPPPRVNXHSR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/16/2013 02:04 PM, Igor Mammedov wrote: >>> +# >>> +# Returns: Nothing on success >>> +## >>> +{ 'command': 'cpu-add', 'data': {'id': 'int'} } >>> + >> >> Should be usable from libvirt's perspective, even if hot-plugging more= >> than one cpu requires more than one QMP call. Do we have a counterpar= t >> QMP call to easily determine which cpu ids can still be hotplugged? I= f >> so, should we mention that in the documentation of this command? > We do not have it yet. Despite interface allowing to plug arbitrary CPU= , > libvirt shouldn't do it in order not to break migration support. Since > migration target should be started with all CPU from source (including > hot-plugged ones). And current command line doesn't have means for this= =2E >=20 > I'd propose do implement in libvirt something like: >=20 > hotplug_id =3D current_cpu_count > { "execute": "cpu-add", "arguments": { "id": hotplug_id } } > current_cpu_count +=3D 1 >=20 > until arbitrary CPU hotplug and interface for enumerating possible CPUs= > settle down. Yes, that's pretty much how libvirt already handles hotplug for xen: libvirt currently maintains its own count of plugged cpus, and hot[un]plugs the next id so that the online cpus are always contiguous ids starting from 0. We are discussing on the libvirt lists ways of improving libvirt API to expose hotplug of arbitrary ids (after all, a 4-cpu bare metal machine can hotunplug cpu 1 while still leaving 2 and 3 online) - but that can come later, perhaps as qemu 1.6 gains better support for NUMA layout with better control of what ids should be used. >=20 > There was a proposal for enumerating possible CPUs in previous version,= > but it was target specific, and I was convinced to drop it for 1.5 and > aim for generic way to expose this information later. > http://lists.gnu.org/archive/html/qemu-devel/2013-04/msg02286.html > Opinion from libvirt POV would be nice to have though. Agreed that deferring more powerful id enumeration for a later patch series is fine, and shouldn't hold up getting basic hotplug into 1.5. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2TTBDSQJJDHPPPRVNXHSR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRdrQMAAoJEKeha0olJ0NqCNEH/3VyaccHFEA/4pp1EibSbHue yOEMTQ2X3LQJiCyrzna1yzKmqhOegsje69SeuLy4rmijS8F1S5Bb4ONCYQYIBrRo l7ZO1ye8eBQF4amBscung0H881ubsFgDxhy+PcS7ugslwZYoGdEiCP83hzO2VmW3 ELInMzVjQLNLfnFsQmhXGDVxoNZn1VmYtv+wisFO9Tdk9oUvdUnXUgMwEvtBrhHC ED+c5xBdyTapoiYw3dQj09Kk2aEfWd67K8BWqQLj2F/4rLp/X/x/A+L16TokbZn+ yDYwty8z4rdd/HarRsR2NY/I1QiT/jY6XrsSrEgI1B63hiHfEzEdeP5/cNzzbow= =VNOu -----END PGP SIGNATURE----- ------enig2TTBDSQJJDHPPPRVNXHSR--