Received: from eggs.gnu.org ([2001:4830:134:3::10]:46453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQS2N-000865-4A for qemu-devel@nongnu.org; Fri, 22 Jul 2016 00:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQS2K-0007Gc-EW for qemu-devel@nongnu.org; Fri, 22 Jul 2016 00:26:10 -0400 Date: Fri, 22 Jul 2016 13:30:28 +1000 From: David Gibson Message-ID: <20160722033028.GH15941@voom.fritz.box> References: <1468833560-17397-1-git-send-email-david@gibson.dropbear.id.au> <20160718150618.icfohmtdzuhaqorz@andariel.pipo.sk> <20160718182035.5ede8ab3@nial.brq.redhat.com> <20160719042859.GC7036@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OWHXb1mYLuhj1Ox" Content-Disposition: inline In-Reply-To: <20160719042859.GC7036@in.ibm.com> Subject: Re: [Qemu-devel] [RFC 0/2] cpu-add compatibility for query-hotpluggable-cpus implementations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: Igor Mammedov , Peter Krempa , qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, abologna@redhat.com --0OWHXb1mYLuhj1Ox Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 19, 2016 at 09:58:59AM +0530, Bharata B Rao wrote: > On Mon, Jul 18, 2016 at 06:20:35PM +0200, Igor Mammedov wrote: > > On Mon, 18 Jul 2016 17:06:18 +0200 > > Peter Krempa wrote: > >=20 > > > On Mon, Jul 18, 2016 at 19:19:18 +1000, David Gibson wrote: > > > > I'm not entirely sure if this is a good idea, and if it is whether > > > > this is a good approach to it. But I'd like to discuss it and see = if > > > > anyone has better ideas. > > > >=20 > > > > As you may know we've hit a bunch of complications with cpu_index > > > > which will impose some limitations with what we can do with the new > > > > query-hotpluggable-cpus interface, and we've run out of time to > > > > address these in qemu-2.7. > > > > > > > > At the same time we're hitting complications with the fact that the > > > > new qemu interface requires a new libvirt interface to use properly, > > > > and that has follow on effects further up the stack. =20 > > >=20 > > > The libvirt interface is basically now depending on adding a working > > > implementation for qemu or a different hypervisor. APIs without > > > implementation are not accepted upstream. > > >=20 > > > It looks like there are the following problems which make the above > > > hard: > > >=20 > > > First of the problem is the missing link between the NUMA topology > > > (currently confirured via 'cpu id' which is not linked in any way to = the > > > query-hotpluggable-cpus entries). This basically means that I'll have= to > > > re-implement the qemu numbering scheme and hope that it doesn't change > > > until a better approach is added. > > with current 'in order' plug/unplug limitation behavior is the same as > > for cpu-add (wrt x86) so device_add could be used as direct replacement > > of cpu-add in NUMA case. > >=20 > > Numa node to CPU in query-hotpluggable-cpus a missing part > > but once numa mapping for hotplugged CPUs (which is broken now) is fixed > > (fix https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00595.htm= l) > > I'll be ready to extend x86.query-hotpluggable-cpus with numa mapping > > that -numa cpus=3D1,2,3... happened to configure. > > (note: that device_add cpu,node=3DX that doesn't match whatever has been > > configured with -numa cpus=3D... will rise error, as numa configuration > > is static and fixed at VM creation time, meaning that "node" option > > in query-hotpluggable-cpus is optional and only to inform users to > > which node cpu belongs) > >=20 > > > Secondly from my understanding of the current state it's impossible to > > > select an arbitrary cpu to hotplug but they need to happen 'in order'= of > > > the cpu id pointed out above (which is not accessible). The grand plan > > > is to allow adding the cpus in any order. This makes the feature look > > > like a proof of concept rather than something useful. >=20 > > having out-of-order plug/unplug would be nice but that wasn't > > the grand plan. Main reason is to replace cpu-add with 'device_add cpu'= and > > on top of that provide support for 'device_del cpu' instead of adding c= pu-del > > command. > > And as result of migration to device_add to avoid changing -smp to match > > present cpus count on target and reuse the same interface as other devi= ces. > >=20 > > We can still pick 'out of order' device_add cpu using migration_id patch > > and revert in-order limit patch. It would work for x86, > > but I think there were issues with SPAPR, that's why I'm in favor of > > in-order limit approach. >=20 > Not that the migration_id patch doesn't work for sPAPR, but it was felt > that having too many IDs (cpu_dt_id, arch_id, migration_id) is not > good/idea/preferable and could cause confusion. I was also concerned that adding another id would be yet another layer of things we needed to maintain compatibility with in future. > I am not clear as to why limiting the out-of-order hotplug is a show > stopper for libvirt actually. Isn't that how it is for cpu-add currently ? >=20 > Regards, > Bharata. >=20 --=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 --0OWHXb1mYLuhj1Ox Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXkZNUAAoJEGw4ysog2bOScgoP/0tsodg+A5Qp53736lfmPrI7 OWl4w7u2fwRh3bUnaY45ySnK5AJqikF1HL+l3m1I27D8Iaavgv0W3/R/tWT6WJK7 KJpltlYFj9hj7Z43Kl1KcxFGxjbPShH17/0GPX4kUBkEycElnxxksf01utOUa/8j hKG1Bkp91lD16s1Tm2jy/cmJfnVp86o9uuD2lXXpVmFtGbc+wRi6WPzA5n/BBbsn oxJ6rzS7cDqlqupJy1gHJedBN/OEsqD3RaohzqbhzuN0KL9g6eAyPVOh20UrXzQ5 wCspieNm6Qg8CB7fWO+JTAstSIXsBF3gbldr9UGjsYDVEgTcBMEQ97eDb9mps9Pa u90MvHJ7TTvtCrcoy0Cq6SCfxEAWlKNzZEexqOwloscPHg2O3UK6TVNt81dk2Qgs WXsEFzpZvXXzlV2KQez3QGAEV+nBDudhbKPM4/d1RYcq3zejydRC2TcBBt/nGq5B ecEuXHLTbENjM4oEWeV6F6Ql4fgi4JYgHSc4BEt7qxtQx+HOChHLAlNpJ5UOG7wD ldv9V6te9OL5U2FAKgT7sWnuTfZlWSZt8W4SOohwQtAH6birc0Mj5cmuoebNX4Q0 vRYuhkIcSZdim+2O1UPjxGGWTpNcv2LPLGNDUKTtH1QsQthx9RwKzOdNm3doTLU+ Meio0w4aS8A5sO5ELEbk =mFEJ -----END PGP SIGNATURE----- --0OWHXb1mYLuhj1Ox--