qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Igor Mammedov <imammedo@redhat.com>
Cc: mst@redhat.com, marcel.a@redhat.com, qemu-devel@nongnu.org,
	vasilis.liaskovitis@profitbricks.com, aliguori@amazon.com,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC 4/8] qdev: link based hotplug
Date: Mon, 24 Mar 2014 13:20:46 +0100	[thread overview]
Message-ID: <5330231E.1030200@suse.de> (raw)
In-Reply-To: <20140321113541.1a5e7a96@nial.usersys.redhat.com>

Am 21.03.2014 11:35, schrieb Igor Mammedov:
> BTW not related to hotplug but why I used link<>s:
> 
> I've added link<>s as an attempt to visualize Andreas' idea to use them for

Anthony's :)

> hotplug and mgmt. It has it's own benefits if we try to provide more or
> less uniform QOM interface view for management. What I have in mind is that
> we could have tree like this:
>  /machine/node[...]/dimm[...]
>                    /cpu[...]/core[...]/thread[...]
> 
> where leaves are link<>s which are prebuilt at startup and set when device
> is added. It provides an easy to enumerate interface for mgmt and also
> gives us a quite informative path that encodes topology and later
> we could use it instead of custom properties. For example:
> 
>   device_add x86cpu,path=/machine/node[1]/cpu[0]/core[3]/thread[2]
> vs
>   device_add x86cpu,apic-id=[who knows how it's calculated]

This still collides with what Anthony and me have been saying about CPU
hot-add: It should not happen on thread level. cpu-add covers the
current approach, but device_add should add a full socket and definitely
not in that /machine/node[n]/... path. You or someone replied on Paolo's
NUMA thread that this was only as an internal convenience for lookups,
now you're pushing this as user ABI. NACK to the latter.

I was hoping that we could let device_add auto-discover free link<>
slots like it does for buses today; having two places to link the same
object would complicate that, so we need to be careful in designing our
link<>s: Having /machine/node[0]/cpu[0] be a link<> would mean no second
link<> directly on /machine/cpu[0], i.e. the NUMA node acting as a
sub-container of the board; on the other hand having a link<> to the
thread CPUState from some NUMA-specific path outside of the composition
model would still be possible due to the different link<> type but
having cpu[0] be a link to the actual socket object rules out using the
same name for a NUMA-only container object as proposed.

> or
>   device_add dimm,path=/machine/node[0]/dimm[5]
> vs
>   device_add dimm,node=0,slot=5
> 
> i.e. being added device could decode all needed information from above
> provided path instead of creating a bunch of custom properties.

Hm, the advantage of having properties there would be better error
checking in terms of restricting paths. I'd be open to having both.

I do wonder in both cases if we should use paths relative to /machine to
avoid them cluttering the command line?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2014-03-24 12:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 15:01 [Qemu-devel] [RFC 0/8] bus-less device hotplug Igor Mammedov
2014-03-20 15:01 ` [Qemu-devel] [RFC 1/8] vl.c: extend -m option to support options for memory hotplug Igor Mammedov
2014-03-20 15:01 ` [Qemu-devel] [RFC 2/8] make machine_class_init() accessible outside of vl.c Igor Mammedov
2014-03-23 15:27   ` Marcel Apfelbaum
2014-03-23 16:22     ` Marcel Apfelbaum
2014-03-20 15:01 ` [Qemu-devel] [RFC 3/8] pc: prepare PC for custom machine state Igor Mammedov
2014-03-23 15:13   ` Marcel Apfelbaum
2014-03-24 10:34     ` Igor Mammedov
2014-03-24 12:28       ` Marcel Apfelbaum
2014-03-24 10:52     ` Andreas Färber
2014-03-24 11:20       ` Michael S. Tsirkin
2014-03-24 11:57         ` Andreas Färber
2014-03-24 12:13       ` Marcel Apfelbaum
2014-03-20 15:01 ` [Qemu-devel] [RFC 4/8] qdev: link based hotplug Igor Mammedov
2014-03-20 16:12   ` Paolo Bonzini
2014-03-20 16:20     ` Igor Mammedov
2014-03-20 18:03       ` Paolo Bonzini
2014-03-21 10:35         ` Igor Mammedov
2014-03-21 11:45           ` Paolo Bonzini
2014-03-24  9:10             ` Igor Mammedov
2014-03-24 12:20           ` Andreas Färber [this message]
2014-03-24 13:12             ` Michael S. Tsirkin
2014-03-20 15:01 ` [Qemu-devel] [RFC 5/8] dimm: implement dimm device abstraction Igor Mammedov
2014-03-20 15:01 ` [Qemu-devel] [RFC 6/8] pc: preallocate hotplug links for DIMMDevices Igor Mammedov
2014-03-20 15:01 ` [Qemu-devel] [RFC 7/8] pc: initialize memory hotplug address space Igor Mammedov
2014-03-20 15:01 ` [Qemu-devel] [RFC 8/8] pc: make PC_MACHINE memory hotplug controller 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=5330231E.1030200@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vasilis.liaskovitis@profitbricks.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 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).