qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Amos Kong <akong@redhat.com>,
	qemu-devel@nongnu.org
Cc: qiaonuohan@cn.fujitsu.com, lcapitulino@redhat.com,
	xiawenc@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v4 5/5] update docs/qmp-full-introspection.txt
Date: Fri, 24 Jan 2014 06:07:54 -0700	[thread overview]
Message-ID: <52E265AA.6050207@redhat.com> (raw)
In-Reply-To: <52E251E8.5020201@redhat.com>

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

On 01/24/2014 04:43 AM, Paolo Bonzini wrote:
> Il 23/01/2014 15:46, Amos Kong ha scritto:
>> +The whole schema information will be returned in one go, it contains
>> +all the schema entries. It doesn't support to be filtered by type
>> +or name. Currently it takes about 4 seconds to return about 1.7M string.
>> +Management only needs to execute this command once after installing
>> +QEMU package.
>> +

But management has to call the command for every variant of the qemu
binary that it plans on driving - on a system with multiple qemu-* for
targetting multiple target types, this starts to border on unacceptably
long for libvirt.  And while libvirt might use this command to learn
about what is supported for a handful of specific commands, making
libvirt store 1.7M + additional memory for its JSON parse of that data
per qemu starts to add up fast, if libvirt were to keep that data around
for the life of libvirtd rather than just learning what it needs from
the string and discarding the string up front.  We've just made an
argument for WHY we need filtering to just a given type/command.

> 
> This is quite a lot.
> 
> Without comments, qapi-schema.json is 27k.  I'd expect the DataObject
> representation to be in the ballpark of 100-200k.
> 
> I don't understand why is it necessary to expand all the types in the
> result?

Any time a type is returned at the top level in the same query (such as
in your global query), management can look up any unexpanded type in the
same result.  I could understand expanding the results when returning
only a subset of the tree (that is, when filtering is added, asking for
a single type should give me all information about that type, including
the subtypes it references, without me having to make multiple calls to
learn about the subtypes), but even then, it might be worth having an
optional boolean flag on the query that says whether I want expansion
vs. compact results.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-01-24 13:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 14:46 [Qemu-devel] [PATCH v4 0/5] QMP full introspection Amos Kong
2014-01-23 14:46 ` [Qemu-devel] [PATCH v4 1/5] qapi: introduce DataObject to describe dynamic structs Amos Kong
2014-02-03 19:56   ` Eric Blake
2014-01-23 14:46 ` [Qemu-devel] [PATCH v4 2/5] qapi: add qapi-introspect.py code generator Amos Kong
2014-01-24  9:12   ` Fam Zheng
2014-01-24  9:34     ` Amos Kong
2014-01-26  4:51       ` Amos Kong
2014-02-04  0:15   ` Eric Blake
2014-02-11  0:35     ` Eric Blake
2014-01-23 14:46 ` [Qemu-devel] [PATCH v4 3/5] qobject: introduce qobject_get_str() Amos Kong
2014-02-04  0:20   ` Eric Blake
2014-01-23 14:46 ` [Qemu-devel] [PATCH v4 4/5] qmp: full introspection support for QMP Amos Kong
2014-01-24 10:48   ` Fam Zheng
2014-01-27  8:17     ` Amos Kong
2014-01-27  8:50       ` Amos Kong
2014-01-27  9:38       ` Paolo Bonzini
2014-01-27 10:07         ` Amos Kong
2014-01-27 10:15           ` Paolo Bonzini
2014-01-27 10:46         ` Fam Zheng
2014-01-28 10:45           ` Amos Kong
2014-01-28 11:14             ` Paolo Bonzini
2014-01-28 13:58               ` Eric Blake
2014-01-29  8:12                 ` Fam Zheng
2014-02-04  0:33   ` Eric Blake
2014-01-23 14:46 ` [Qemu-devel] [PATCH v4 5/5] update docs/qmp-full-introspection.txt Amos Kong
2014-01-24 11:43   ` Paolo Bonzini
2014-01-24 13:07     ` Eric Blake [this message]
2014-01-24  8:42 ` [Qemu-devel] [PATCH v4 0/5] QMP full introspection Amos Kong

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=52E265AA.6050207@redhat.com \
    --to=eblake@redhat.com \
    --cc=akong@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qiaonuohan@cn.fujitsu.com \
    --cc=xiawenc@linux.vnet.ibm.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).