From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWFxI-0005FD-52 for qemu-devel@nongnu.org; Wed, 17 Feb 2016 23:12:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWFxE-0007VH-Tt for qemu-devel@nongnu.org; Wed, 17 Feb 2016 23:12:40 -0500 Received: from ozlabs.org ([103.22.144.67]:59343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWFxE-0007UZ-Ah for qemu-devel@nongnu.org; Wed, 17 Feb 2016 23:12:36 -0500 Date: Thu, 18 Feb 2016 15:05:10 +1100 From: David Gibson Message-ID: <20160218040510.GI15224@voom.fritz.box> References: <1455556228-232720-1-git-send-email-imammedo@redhat.com> <878u2lhi8i.fsf@blackfin.pond.sub.org> <20160216054834.GM2269@voom.redhat.com> <20160216115242.79d8590d@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WHz+neNWvhIGAO8A" Content-Disposition: inline In-Reply-To: <20160216115242.79d8590d@nial.brq.redhat.com> Subject: Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: lvivier@redhat.com, agraf@suse.de, thuth@redhat.com, ehabkost@redhat.com, aik@ozlabs.ru, Markus Armbruster , qemu-devel@nongnu.org, abologna@redhat.com, bharata@linux.vnet.ibm.com, pbonzini@redhat.com, afaerber@suse.de --WHz+neNWvhIGAO8A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 16, 2016 at 11:52:42AM +0100, Igor Mammedov wrote: > On Tue, 16 Feb 2016 16:48:34 +1100 > David Gibson wrote: >=20 > > On Mon, Feb 15, 2016 at 08:43:41PM +0100, Markus Armbruster wrote: > > > Igor Mammedov writes: > > > =20 > > > > it will allow mgmt to query present and possible to hotplug CPUs > > > > it is required from a target platform that wish to support > > > > command to set board specific MachineClass.possible_cpus() hook, > > > > which will return a list of possible CPUs with options > > > > that would be needed for hotplugging possible CPUs. > > > > > > > > For RFC there are: > > > > 'arch_id': 'int' - mandatory unique CPU number, > > > > for x86 it's APIC ID for ARM it's MPIDR > > > > 'type': 'str' - CPU object type for usage with device_add > > > > > > > > and a set of optional fields that would allows mgmt tools > > > > to know at what granularity and where a new CPU could be > > > > hotplugged; > > > > [node],[socket],[core],[thread] > > > > Hopefully that should cover needs for CPU hotplug porposes for > > > > magor targets and we can extend structure in future adding > > > > more fields if it will be needed. > > > > > > > > also for present CPUs there is a 'cpu_link' field which > > > > would allow mgmt inspect whatever object/abstraction > > > > the target platform considers as CPU object. > > > > > > > > For RFC purposes implements only for x86 target so far. =20 > > >=20 > > > Adding ad hoc queries as we go won't scale. Could this be solved by a > > > generic introspection interface? =20 > >=20 > > That's my main concern as well. > >=20 > > Igor, did you see my post with a proposal for how to organize > > hotpluggable packages of CPUs? I believe that would also solve the > > problem at hand here, by having a standard QOM location with > > discoverable cpu objects. > >=20 > > The interface in your patch in particular would *not* solve the > > problem of advertising to management layers what the granularity of > > CPU hotplug is, which we absolutely need for Power. > I've had in mind Power as well, as topology items are optional > a query can respond with what granularity board would like > to use and what type of object it could be hotplugged: >=20 > -> { "execute": "query-hotpluggable-cpus" } > <- {"return": [ > {"core": 2, "socket": 2, "arch_id": 2, "type": "power-foo-core-cpu"}, > {"core": 1, "socket": 1, "arch_id": 1, "type": "power-foo-core-cpu"}, > {"core": 0, "socket": 0, "arch_id": 0, "type": "power-foo-core-cpu",= "cpu_link": "/machine/unattached/device[3]"} > ]} Hrm.. except your arch_id is supplied by a CPUClass hook, making it a per-thread property, whereas here it needs to be per-core. Other than that I guess this covers what we need for Power, however I dislike the idea of typing the hotplug granularity to be at any fixed level of the socket/core/thread heirarchy. As noted elsewhere, while all machines are likely to have some sort of similar heirarchy, giving it fixed levels of "socket", "core" and "thread" may be limiting. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --WHz+neNWvhIGAO8A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWxUL1AAoJEGw4ysog2bOShsQQAICWW4qGK6fDDmG8LnSistgX Kft1P1t5QFkuCD4WibtHLQ95s8Fwqg665MP5Eih38yJ4Q9jL0vvfeYGYZT14kjqk k111MJzHjay+KxPVd8TexHnaZdoSYLz39G44/Aif6EhtqZ4s/INA6VsDXyL5FQKW GqK/HM7B1HcJ6DE8bd7SIv/cq3rxSGWpWIwP1G2JyfFfJ9wKEXMCID7LMfGh7EEX 8Hcr1kRh+BmAQMS5Gyb9qzlc0jumQc0VmsQPQJ9O4dUq4AhOYAp5OdB4YZimOvOA a17fn7RXRhxEOPIMZbfeGaRQYmluYGM2JkBzP2FHG8wQwLZF63u8oEXN+TeAQrmL FHtogGIT3OGdRWuKPKzFgpCUYjC3/zQnHevoIZN3vJ10glBtXCrJpArqv53JWVZA 3RrS88oa7kWNsTRBa33UIHe0a3s8fSze4IA7l50JCp8SVtwKGbL+g6GQaTFUU3cU z5r0YO64SiCL5pqAtx1MZ91y+Jb8fGy0kcU3B6TRZqAKZ1KGTeMMhurxQbNMy610 m2oILV5T9nWylsO9aANrnHEyK9A8vT9CBDQC+Sqr1qTOknCgYHhFq7mlYFmGjzhg nrkpZJHe+A8FSTqYlLulpZbvIvTp+iD0U7ZcgipA/4U32I1+tqe6gtsA9stHxjM0 IG8SFzItNEX8gNn/OETa =0o7R -----END PGP SIGNATURE----- --WHz+neNWvhIGAO8A--