qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Krempa <pkrempa@redhat.com>
Cc: imammedo@redhat.com, bharata@linux.vnet.ibm.com,
	abologna@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	groug@kaod.org
Subject: Re: [Qemu-devel] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available
Date: Tue, 19 Jul 2016 11:01:16 +1000	[thread overview]
Message-ID: <20160719010116.GT16769@voom.fritz.box> (raw)
In-Reply-To: <20160718140118.ijk4c3g4y7lvzszj@andariel.pipo.sk>

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-07-19  1:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  9:19 [Qemu-devel] [RFC 0/2] cpu-add compatibility for query-hotpluggable-cpus implementations David Gibson
2016-07-18  9:19 ` [Qemu-devel] [RFC 1/2] spapr: Reverse order of hotpluggable cpus list David Gibson
2016-07-19 11:52   ` Peter Krempa
2016-07-20  1:00     ` David Gibson
2016-07-20  7:01       ` Peter Krempa
2016-07-21 13:07         ` David Gibson
2016-07-21 14:30           ` Igor Mammedov
2016-07-21 14:42             ` Greg Kurz
2016-07-25  6:09         ` David Gibson
2016-07-25  8:14           ` Igor Mammedov
2016-07-26  1:13             ` David Gibson
2016-07-18  9:19 ` [Qemu-devel] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available David Gibson
2016-07-18 14:01   ` Peter Krempa
2016-07-19  1:01     ` David Gibson [this message]
2016-07-19  4:02     ` Bharata B Rao
2016-07-19  7:51       ` Igor Mammedov
2016-07-19 11:50         ` Peter Krempa
2016-07-18 15:06 ` [Qemu-devel] [RFC 0/2] cpu-add compatibility for query-hotpluggable-cpus implementations Peter Krempa
2016-07-18 16:20   ` Igor Mammedov
2016-07-19  4:28     ` Bharata B Rao
2016-07-19  8:02       ` Igor Mammedov
2016-07-22  3:30       ` David Gibson
2016-07-19 11:19     ` Peter Krempa
2016-07-19  1:09   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160719010116.GT16769@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=abologna@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).