From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxLT2-0002U6-8o for qemu-devel@nongnu.org; Fri, 13 Nov 2015 16:01:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxLSy-00004t-VO for qemu-devel@nongnu.org; Fri, 13 Nov 2015 16:01:08 -0500 Received: from e06smtp06.uk.ibm.com ([195.75.94.102]:58864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxLSy-0008Vn-Kh for qemu-devel@nongnu.org; Fri, 13 Nov 2015 16:01:04 -0500 Received: from localhost by e06smtp06.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Nov 2015 21:01:01 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id B5AF91B0804B for ; Fri, 13 Nov 2015 21:01:17 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tADL0xA06553998 for ; Fri, 13 Nov 2015 21:00:59 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tADL0xMH012880 for ; Fri, 13 Nov 2015 14:00:59 -0700 References: <1444739866-14798-1-git-send-email-berrange@redhat.com> <1444739866-14798-7-git-send-email-berrange@redhat.com> <5646286B.2030307@suse.de> From: Christian Borntraeger Message-ID: <56464F8A.3070709@de.ibm.com> Date: Fri, 13 Nov 2015 22:00:58 +0100 MIME-Version: 1.0 In-Reply-To: <5646286B.2030307@suse.de> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=c3=a4rber?= , "Daniel P. Berrange" , qemu-devel@nongnu.org, Pavel Fedin Cc: Paolo Bonzini , Markus Armbruster , Peter Maydell 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 >> >> 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 >> Signed-off-by: Pavel Fedin > > (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.