Received: from eggs.gnu.org ([2001:4830:134:3::10]:60403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPJYi-0000Tp-Hs for qemu-devel@nongnu.org; Mon, 18 Jul 2016 21:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPJYg-0000KF-W6 for qemu-devel@nongnu.org; Mon, 18 Jul 2016 21:10:52 -0400 Date: Tue, 19 Jul 2016 11:01:16 +1000 From: David Gibson Message-ID: <20160719010116.GT16769@voom.fritz.box> References: <1468833560-17397-1-git-send-email-david@gibson.dropbear.id.au> <1468833560-17397-3-git-send-email-david@gibson.dropbear.id.au> <20160718140118.ijk4c3g4y7lvzszj@andariel.pipo.sk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v15hXiddb3kq3Bam" Content-Disposition: inline In-Reply-To: <20160718140118.ijk4c3g4y7lvzszj@andariel.pipo.sk> Subject: Re: [Qemu-devel] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Krempa Cc: imammedo@redhat.com, bharata@linux.vnet.ibm.com, abologna@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, groug@kaod.org --v15hXiddb3kq3Bam Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 18, 2016 at 04:01:18PM +0200, Peter Krempa wrote: > On Mon, Jul 18, 2016 at 19:19:20 +1000, David Gibson wrote: > > We've recently added a new device_add based cpu hotplug > > implementation, with the spapr machine type being the first user. In > > order to overcome the limitations of the old cpu_add interface, it > > works very differently. That's going to require a new interface in > > libvirt to properly use the new interface in qemu, which will in turn > > require work further up the stack to make use of it. > >=20 > > While that's certainly necessary in the long run, it would be nice if > > we could have at least something working with the old cpu_add > > interface. This patch is an attempt to do so. > >=20 > > This patch implements cpu-add on machines which don't support it > > directly but which do support the query-hotpluggable-cpus interface. > > Essentially, > > cpu-add > > will be treated as a device_add of the n-th entry in the list provided > > by query-hotpluggable-cpus. >=20 > Does this have the same implications when libvirt will need to re-create > a matching qemu process for migration target? (Will we need to specify > -device cpu,... for every CPU 'entity' added this way on the command > line?) >=20 > When using cpu_add libvirt recreates the process by just increasing the > number of active cpus specified via '-smp'. As long as the cpus are added "in order" (which is necessary to avoid other problems anyway), then increasing the value to -smp is sufficient. =2E..but working out how much to increase -smp may be an issue. With Power -smp will need to be increased by #threads for each cpu-add instead of just 1 as it is now on x86. > In case where libvirt would need to add the -device entries this would > create just problems with compatibility. Libvirt needs to add XML > specification of the cpus in order to allow tracking which cpus need to > be added on the commandline. >=20 > > This means that on spapr cpu-add will add a whole core, not a single > > vcpu as on x86. That's arguably cheating on the cpu-add semantics, but > > AFAICT those were never terribly well defined anyway. >=20 > Peter >=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 --v15hXiddb3kq3Bam Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXjXvcAAoJEGw4ysog2bOSad4P/1Wl0hNeTos1jzCZPWEwNNzH Up5tRKA55l89tX+yhJi88PulFMRX4BChfRDZtcSw0ioKzbcVeEwmpOjM4+OJU22c CCv6lhn/LhOyE8bobEdnNCIOlWVqGW0vLPbe+dVVnNY5ad16lq3kbRWOczRsk/Y7 tqNqrb623LRsqunvBNraRau8VZ1Fo82t1DYMkE6rM4DpyPMLBxc2bnt6jY86ysVy 4uSy8w7vwOAvkMwQjbj9RaaVfLFzRRvNXcM0Nf9QSo4rh+7hGzdCj+BjsxXlrQ0s Tip65Hjzw9XZ2hnfoUcCYG8hycCp4qOlL73bVNsmL6NIatcy560D7A0UOPiScQJm LfJl8u6d39ZLqk23IoKDUkVjX9VvYUicD1y2g+Wl/YlCosBrHZ3i/2n0yGfcJsZV h1RBE4eqveOoQx6TCHtJ3Ac4wErv206l2AqpfA+UMZ6zpXH0sh51CDwonOfDBxez /fhj0CKenmm0lIvQXXymGBhTGQWq4McDyvjOV2TFHKWGW/GwZRGuh9B1Y+dQWDDR hsIPxo/WGkC9RC2hMwo6F49KT86jcZBKiHU1SqhFvP7WqdmzOSbGX3gdJr5NCWuF 9J3nJYjwcD3Ql5R9Nql+MJfeFbXSnSOXDhk6m/cO4b91la81JmY4J8Pq4azLBUJF 5s/XgTYREU8ZZJoqSdUF =B4V1 -----END PGP SIGNATURE----- --v15hXiddb3kq3Bam--