[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotplu
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available |
Date: |
Tue, 19 Jul 2016 11:01:16 +1000 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
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.
> >
> > 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.
> >
> > 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 <n>
> > will be treated as a device_add of the n-th entry in the list provided
> > by query-hotpluggable-cpus.
>
> 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?)
>
> 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.
...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.
>
> > 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.
>
> Peter
>
--
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
signature.asc
Description: PGP signature
[Qemu-ppc] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, David Gibson, 2016/07/18
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, Peter Krempa, 2016/07/19
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, David Gibson, 2016/07/19
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, Peter Krempa, 2016/07/20
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, David Gibson, 2016/07/21
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, Igor Mammedov, 2016/07/21
- Re: [Qemu-ppc] [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list, Greg Kurz, 2016/07/21