All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Igor Mammedov <imammedo@redhat.com>
Cc: lvivier@redhat.com, agraf@suse.de, thuth@redhat.com,
	ehabkost@redhat.com, aik@ozlabs.ru,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, abologna@redhat.com,
	bharata@linux.vnet.ibm.com, pbonzini@redhat.com,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus
Date: Wed, 24 Feb 2016 22:26:04 +1100	[thread overview]
Message-ID: <20160224112604.GO2808@voom.fritz.box> (raw)
In-Reply-To: <20160218115516.5c66fee4@nial.brq.redhat.com>

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

On Thu, Feb 18, 2016 at 11:55:16AM +0100, Igor Mammedov wrote:
> On Thu, 18 Feb 2016 15:05:10 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Tue, Feb 16, 2016 at 11:52:42AM +0100, Igor Mammedov wrote:
> > > On Tue, 16 Feb 2016 16:48:34 +1100
> > > David Gibson <david@gibson.dropbear.id.au> wrote:
> > >   
> > > > On Mon, Feb 15, 2016 at 08:43:41PM +0100, Markus Armbruster wrote:  
> > > > > Igor Mammedov <imammedo@redhat.com> writes:
> > > > >     
> > > > > > 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.    
> > > > > 
> > > > > Adding ad hoc queries as we go won't scale.  Could this be solved by a
> > > > > generic introspection interface?    
> > > > 
> > > > That's my main concern as well.
> > > > 
> > > > 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.
> > > > 
> > > > 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:
> > >   
> > > -> { "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.
> That's only for demo purposes, it could be something else that is fixed
> and stable. For example it could be QOM link path associated with it.
> Like: { 'path': '/cpu[0]', ... }, or just something else to enumerate
> a set of possible CPUs.

Hm, ok.

> > 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.
> That's an optional granularity, if target doesn't care, it could skip
> that parameters or even extend command to provide a target specific
> parameters to create a CPU object, socket/core/thread are provided here
> as they would fit majority usecases. These optional parameters are
> basically a set of mandatory CPU object properties with values
> that mgmt should supply at -device/device_add time to create a CPU with
> expected properties.

It seems really weird to me to tell management a bunch of parameters
which it then needs to echo back to device_add.  If we're adding an
interface, why not just add a "add/remove cpu unit" interface.

-- 
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-02-24 11:27 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 17:10 [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus Igor Mammedov
2016-02-15 17:44 ` Eric Blake
2016-02-16  9:58   ` Igor Mammedov
2016-02-15 19:43 ` Markus Armbruster
2016-02-16  5:48   ` David Gibson
2016-02-16 10:52     ` Igor Mammedov
2016-02-18  4:05       ` David Gibson
2016-02-18 10:55         ` Igor Mammedov
2016-02-24 11:26           ` David Gibson [this message]
2016-02-24 13:10             ` Igor Mammedov
2016-02-16 10:36   ` Igor Mammedov
2016-02-16 12:35     ` Markus Armbruster
2016-02-16 12:41       ` Andreas Färber
2016-02-16 12:58         ` Markus Armbruster
2016-02-18  3:52       ` David Gibson
2016-02-18  7:33         ` Markus Armbruster
2016-02-17 20:59     ` Eduardo Habkost
2016-02-18  3:39     ` David Gibson
2016-02-18 10:37       ` Igor Mammedov
2016-02-19  4:38         ` David Gibson
2016-02-19  9:51           ` Markus Armbruster
2016-02-19 16:11             ` Igor Mammedov
2016-02-22  2:32             ` David Gibson
2016-02-22  9:05               ` Markus Armbruster
2016-02-24  1:57                 ` David Gibson
2016-02-24  8:42                   ` Markus Armbruster
2016-02-24 10:51                     ` David Gibson
2016-02-24 11:03                       ` Igor Mammedov
2016-02-25  1:03                         ` David Gibson
2016-02-25 10:22                           ` Igor Mammedov
2016-02-19 15:49           ` Igor Mammedov
2016-02-22  2:54             ` David Gibson
2016-02-23  9:46               ` Igor Mammedov
2016-02-23 21:26                 ` Eduardo Habkost
2016-02-24  1:52                   ` David Gibson
2016-02-24 14:42                   ` Igor Mammedov
2016-02-25  1:05                     ` David Gibson
2016-02-25 17:52                     ` Eduardo Habkost
2016-02-29 15:42                       ` Igor Mammedov
2016-03-01  1:19                         ` David Gibson
2016-03-01 10:49                           ` Igor Mammedov
2016-03-01 18:17                             ` Igor Mammedov
2016-03-01 14:02                         ` Eduardo Habkost
2016-02-24  1:54                 ` David Gibson
2016-02-24 14:17                   ` Igor Mammedov
2016-02-25  1:25                     ` David Gibson
2016-02-25 12:43                       ` Igor Mammedov
2016-02-26  4:12                         ` David Gibson
2016-02-26 10:37                           ` Igor Mammedov
2016-02-24  8:53                 ` Markus Armbruster
2016-02-24 11:31                   ` Igor Mammedov

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=20160224112604.GO2808@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=abologna@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.