All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Markus Armbruster <armbru@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: lvivier@redhat.com, thuth@redhat.com, ehabkost@redhat.com,
	aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org,
	abologna@redhat.com, bharata@linux.vnet.ibm.com,
	pbonzini@redhat.com, David Gibson <dgibson@redhat.com>,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus
Date: Tue, 16 Feb 2016 13:41:05 +0100	[thread overview]
Message-ID: <56C318E1.1070500@suse.de> (raw)
In-Reply-To: <87y4aksuht.fsf@blackfin.pond.sub.org>

Am 16.02.2016 um 13:35 schrieb Markus Armbruster:
> Igor Mammedov <imammedo@redhat.com> writes:
> 
>> On Mon, 15 Feb 2016 20:43:41 +0100
>> Markus Armbruster <armbru@redhat.com> 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?
>> Do you mean generic QOM introspection?
> 
> Possibly, but I don't want to prematurely limit the conversation to QOM
> introspection.
> 
>> Using QOM we could have '/cpus' container and create QOM links
>> for exiting (populated links) and possible (empty links) CPUs.
>> However in that case link's name will need have a special format
>> that will convey an information necessary for mgmt to hotplug
>> a CPU object, at least:
>>   - where: [node],[socket],[core],[thread] options
>>   - optionally what CPU object to use with device_add command
> 
> Encoding information in names feels wrong.
> 
>> Another approach to do QOM introspection would be to model hierarchy 
>> of objects like node/socket/core..., That's what Andreas
>> worked on. Only it still suffers the same issue as above
>> wrt introspection and hotplug, One can pre-create empty
>> [nodes][sockets[cores]] containers at startup but then
>> leaf nodes that could be hotplugged would be a links anyway
>> and then again we need to give them special formatted names
>> (not well documented at that mgmt could make sense of).
>> That hierarchy would need to become stable ABI once
>> mgmt will start using it and QOM tree is quite unstable
>> now for that. For some targets it involves creating dummy
>> containers like node/socket/core for x86 where just modeling
>> a thread is sufficient.
> 
> I acknowledge your concern regarding QOM tree stability.  We have QOM
> introspection commands since 1.2.  They make the QOM tree part of the
> external interface, but we've never spelled out which parts of it (if
> any) are ABI.  Until we do, parts become de facto ABI by being used in
> anger.  As a result, we don't know something's ABI until it breaks.
> 
> Andreas, do you have an opinion on proper use of QOM by external
> software?

This is absolutely untrue, there have been ABI rules in place and I held
a presentation covering them in 2012...

Andreas

> 
>> The similar but a bit more abstract approach was suggested
>> by David https://lists.gnu.org/archive/html/qemu-ppc/2016-02/msg00000.html
> 
> Cc'ing him.  If I understand the high-level idea correctly, David
> proposes to have an abstract type cpu-package with generic properties.
> Its concrete subtypes are composed of whatever components make up the
> hot-pluggable unit.
> 
> Management software can then use the generic properties to deal with hot
> plug without having to know about the concrete subtypes, at least to
> some useful degree.
> 
> Similarly, the generic properties suffice for implementing generic
> high-level interfaces like -smp.
> 
> David, is that a fair summary?
> 
> Naturally, we need a way to introspect available subtypes of cpu-package
> to answer questions like what concrete types can actually be plugged
> into this board.
> 
> This could be an instance of the generic QOM introspection question
> "what can plug into this socket"?  Unfortunately, I don't know enough
> QOM to put that into more concrete terms.  Andreas, Paolo, can you help
> out?
> 
>> Benefit of dedicated CPU hotplug focused QMP command is that
>> it can be quite abstract to suite most targets and not depend
>> on how a target models CPUs internally and still provide
>> information needed for hotplugging a CPU object.
>> That way we can split efforts on how we model/refactor CPUs
>> internally and how mgmt would work with them using
>> -device/device_add.
> 
> CPUs might be special enough to warrant special commands.  Nevertheless,
> non-special solutions should be at least explored.  That's what we're
> doing here.
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)

  reply	other threads:[~2016-02-16 12:41 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
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 [this message]
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=56C318E1.1070500@suse.de \
    --to=afaerber@suse.de \
    --cc=abologna@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgibson@redhat.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.