From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: aik@ozlabs.ru,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH] spapr: Reduce creation of LMB DR connectors from O(n^3) to O(n^2)
Date: Thu, 10 Sep 2015 20:30:57 +1000 [thread overview]
Message-ID: <20150910103057.GB11781@voom> (raw)
In-Reply-To: <CAPokK=qUp2-6ET54_u1fPkb=jVQ6NF6auxdFrKaEOrUnQz+UYQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]
On Thu, Sep 10, 2015 at 01:42:57AM -0700, Peter Crosthwaite wrote:
> On Wed, Sep 9, 2015 at 11:28 PM, David Gibson
> <david@gibson.dropbear.id.au> wrote:
> > The dynamic reconfiguration (hotplug) code for the pseries machine type
> > uses a "DR connector" QOM object for each resource it will be possible
> > to hotplug. Each of these is added to its owner using
> > object_property_add_child(owner, "dr-connector[*], ...);
> >
>
> > This works ok for most cases, but gets ugly when allowing large amounts of
> > hotplugged RAM. For RAM, there's a DR connector object for every 256MB of
> > potential memory. So if maxmem=2T, for example, there are >250,000 objects
> > under the same parent.
> >
> > The QOM interfaces aren't really designed for this. In particular
> > object_property_add() has O(n^2) time complexity (in the number of existing
> > children) for the [*] case. First it has a linear search through array
> > indices to find a free slot, each of which is attempted to a recursive call
> > to object_property_add() with a specific [N]. Those calls are O(n) because
> > there's a linear search through all properties to check for duplicates.
> >
>
> Does this help? I think it's already queued:
>
>
>http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg05790.html
It doesn't help our case; it's basically a fix for a different
instance of the same problem.
--
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: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-09-10 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 6:28 [Qemu-devel] [RFC PATCH] spapr: Reduce creation of LMB DR connectors from O(n^3) to O(n^2) David Gibson
2015-09-10 8:42 ` Peter Crosthwaite
2015-09-10 10:30 ` David Gibson [this message]
2015-09-11 12:43 ` Paolo Bonzini
2015-09-14 1:26 ` David Gibson
2015-09-11 16:12 ` Bharata B Rao
2015-09-14 1:32 ` 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=20150910103057.GB11781@voom \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=bharata@linux.vnet.ibm.com \
--cc=crosthwaitepeter@gmail.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).