qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Pavel Fedin" <p.fedin@samsung.com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement
Date: Mon, 27 Jul 2015 14:23:32 +0100	[thread overview]
Message-ID: <20150727132332.GD9132@redhat.com> (raw)
In-Reply-To: <87r3ntzra9.fsf@blackfin.pond.sub.org>

On Mon, Jul 27, 2015 at 03:03:26PM +0200, Markus Armbruster wrote:
> Pavel Fedin <p.fedin@samsung.com> writes:
> 
> > Avoid repetitive lookup of every property in array starting from 0 by adding
> > one more property which caches last used index. Every time an array is
> > expanded the index is picked up from this cache.
> >
> > The property is a uint32_t and its name is name of the array plus '#'
> > ('name#'). It has getter function in order to allow to inspect it from
> > within monitor.
> 
> Do we really want '#' in property names?  Elsewhere, we require names to
> be id_wellformed().  I've long argued for doing that consistently[*],
> but QOM still doesn't.
> 
> I've always hated "automatic arrayification", not least because it
> encodes semantics in property names.  I tried to replace it[**], but
> Paolo opposed it.  Which makes him the go-to guy for reviewing anything
> that touches it ;-P

Yeah, I think the magic arrayification behaviour is pretty unpleasant.
It feels like a poor hack to deal with fact that we've not got support
for setting non-scalar properties. Since we're representing arrays
implicitly, we have in turned created the performance problem that
we're facing now because we don't explicitly track the size of the
array. Now we're going to add yet more magic properties to deal this :-(
Not to mention the fact that we've no type safety on the array elements
we're storing eg  propname[0] could be an int16, propname[1] could be
a string, and so on with no checking.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2015-07-27 13:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  9:38 [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement Pavel Fedin
2015-07-14  9:39 ` [Qemu-devel] [PATCH v4 1/2] QOM: Introduce object_property_add_single() Pavel Fedin
2015-07-14  9:39 ` [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement Pavel Fedin
2015-07-27 11:42   ` Daniel P. Berrange
2015-07-27 14:36     ` Pavel Fedin
2015-07-27 13:03   ` Markus Armbruster
2015-07-27 13:23     ` Daniel P. Berrange [this message]
2015-07-27 13:46       ` Paolo Bonzini
2015-07-27 14:36     ` Pavel Fedin
2015-07-27 14:57       ` Andreas Färber
2015-07-27 15:06         ` Paolo Bonzini
2015-07-27 15:09           ` Paolo Bonzini
2015-07-27 15:19           ` Pavel Fedin
2015-07-27 15:22             ` Paolo Bonzini
2015-07-28  6:45               ` Pavel Fedin
2015-07-28  7:06                 ` Paolo Bonzini
2015-07-27 11:19 ` [Qemu-devel] [PATCH v4 0/2] " Daniel P. Berrange

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=20150727132332.GD9132@redhat.com \
    --to=berrange@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=p.fedin@samsung.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@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).