From: "Andreas Färber" <afaerber@suse.de>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Pavel Fedin <p.fedin@samsung.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable
Date: Fri, 13 Nov 2015 22:25:07 +0100 [thread overview]
Message-ID: <56465533.3030501@suse.de> (raw)
In-Reply-To: <56464F8A.3070709@de.ibm.com>
Am 13.11.2015 um 22:00 schrieb Christian Borntraeger:
> On 11/13/2015 07:14 PM, Andreas Färber wrote:
>> Am 13.10.2015 um 14:37 schrieb Daniel P. Berrange:
>>> From: Pavel Fedin <p.fedin@samsung.com>
>>>
>>> ARM GICv3 systems with large number of CPUs create lots of IRQ pins. Since
>>> every pin is represented as a property, number of these properties becomes
>>> very large. Every property add first makes sure there's no duplicates.
>>> Traversing the list becomes very slow, therefore qemu initialization takes
>>> significant time (several seconds for e. g. 16 CPUs).
>>>
>>> This patch replaces list with GHashTable, making lookup very fast. The only
>>> drawback is that object_child_foreach() and object_child_foreach_recursive()
>>> cannot modify their objects during traversal, since GHashTableIter does not
>>> have modify-safe version. However, the code seems not to modify objects via
>>> these functions.
>>>
>>> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>>> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
>>
>> (note these seemed misordered)
>>
>> I have queued things up to 6/7 on qom-next:
>> https://github.com/afaerber/qemu-cpu/commits/qom-next
>>
>> This patch didn't apply and I had to hand-apply one hunk (which I
>> double-checked, but you never know).
>>
>> Unfortunately I run into this test failure:
>>
>> TEST: tests/device-introspect-test... (pid=4094)
>> /s390x/device/introspect/list: OK
>> /s390x/device/introspect/none: OK
>> /s390x/device/introspect/abstract: OK
>> /s390x/device/introspect/concrete:
>> (process:4102): GLib-CRITICAL **: g_hash_table_iter_next: assertion
>> 'ri->version == ri->hash_table->version' failed
>>
>> (process:4102): GLib-CRITICAL **: g_hash_table_iter_next: assertion
>> 'ri->version == ri->hash_table->version' failed
>>
>> (process:4102): GLib-CRITICAL **: iter_remove_or_steal: assertion
>> 'ri->version == ri->hash_table->version' failed
>> **
>> ERROR:/home/andreas/QEMU/qemu/qom/object.c:867:object_unref: assertion
>> failed: (obj->ref > 0)
>> Broken pipe
>> FAIL
>> GTester: last random seed: R02S4fa2068506971129a7ebe2323dbe03b7
>> (pid=4104)
>> FAIL: tests/device-introspect-test
>> TEST: tests/qom-test... (pid=4105)
>> /s390x/qom/s390-ccw-virtio-2.5: OK
>> /s390x/qom/s390-ccw-virtio-2.4: OK
>> /s390x/qom/none: OK
>> /s390x/qom/s390-virtio:
>> WARNING
>> The s390-virtio machine (non-ccw) is deprecated.
>> It will be removed in 2.6. Please use s390-ccw-virtio
>> OK
>> PASS: tests/qom-test
>>
>> Are you sure you tested all targets?
>> Any hunch where this might stem from?
>>
>> The below patch reveals that the ref count is 0. Might be just a symptom
>> of the actual problem though.
>
> A simpler reproducer is
> s390x-softmmu/qemu-system-s390x -device sclp,help
> which fails with this patch and succeeds without.
Thanks! sclp_init() seems to violate several QOM design principles in
that it uses object_new() during TypeInfo::instance_init() and uses a
TYPE_... constant as property name. But nothing else stands out immediately.
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2015-11-13 21:25 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 12:37 [Qemu-devel] [PATCH v4 0/7] qom: more efficient object property handling Daniel P. Berrange
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 1/7] qom: introduce ObjectPropertyIterator struct for iteration Daniel P. Berrange
2015-11-05 16:59 ` Andreas Färber
2015-11-17 15:25 ` Markus Armbruster
2015-11-17 15:27 ` Daniel P. Berrange
2015-11-17 15:35 ` Markus Armbruster
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 2/7] qmp: convert QMP code to use object property iterators Daniel P. Berrange
2015-11-05 17:08 ` Andreas Färber
2015-11-17 15:26 ` Markus Armbruster
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 3/7] vl: convert machine help " Daniel P. Berrange
2015-11-05 17:10 ` Andreas Färber
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 4/7] ppc: convert spapr " Daniel P. Berrange
2015-11-05 17:16 ` Andreas Färber
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 5/7] net: convert net filter " Daniel P. Berrange
2015-11-05 17:18 ` Andreas Färber
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable Daniel P. Berrange
2015-11-05 18:05 ` Andreas Färber
2015-11-06 9:02 ` Pavel Fedin
2015-11-06 9:31 ` Daniel P. Berrange
2015-11-06 9:37 ` Pavel Fedin
2015-11-13 18:14 ` Andreas Färber
2015-11-13 21:00 ` Christian Borntraeger
2015-11-13 21:25 ` Andreas Färber [this message]
2015-11-16 7:13 ` Pavel Fedin
2015-11-16 8:16 ` Christian Borntraeger
2015-11-16 9:38 ` Andreas Färber
2015-11-16 10:31 ` Pavel Fedin
2015-11-16 16:44 ` Andreas Färber
2015-11-16 16:53 ` Daniel P. Berrange
2015-11-16 8:53 ` Paolo Bonzini
2015-11-16 9:48 ` Andreas Färber
2015-11-16 9:50 ` Paolo Bonzini
2015-11-16 11:35 ` Daniel P. Berrange
2015-10-13 12:37 ` [Qemu-devel] [PATCH v4 7/7] qom: allow properties to be registered against classes Daniel P. Berrange
2015-10-13 13:18 ` Pavel Fedin
2015-11-05 18:12 ` Andreas Färber
2015-11-06 9:32 ` Daniel P. Berrange
2015-11-18 23:35 ` Andreas Färber
2015-10-13 12:54 ` [Qemu-devel] [PATCH v4 0/7] qom: more efficient object property handling Andreas Färber
2015-10-13 12:59 ` Daniel P. Berrange
2015-10-14 6:57 ` Pavel Fedin
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=56465533.3030501@suse.de \
--to=afaerber@suse.de \
--cc=armbru@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=p.fedin@samsung.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).