From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJgR4-0003yK-Cq for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:19:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJgQz-0008HA-Dr for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:19:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJgQz-0008H3-8M for qemu-devel@nongnu.org; Mon, 27 Jul 2015 07:19:05 -0400 Date: Mon, 27 Jul 2015 12:19:01 +0100 From: "Daniel P. Berrange" Message-ID: <20150727111901.GA18731@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: Peter Crosthwaite , qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= On Tue, Jul 14, 2015 at 12:38:59PM +0300, Pavel Fedin wrote: > The function originally behaves very badly when adding properties with "[*]" > suffix. Normally these are used for numbering IRQ pins. In order to find the > correct starting number the function started from zero and checked for > duplicates. This takes incredibly long time with large number of CPUs because > number of IRQ pins on some architectures (like ARM GICv3) gets multiplied by > number of CPUs. > > The solution is to add one more property which caches last used index so that > duplication check is not repeated thousands of times. Every time an array is > expanded the index is picked up from this cache. > > The modification decreases qemu startup time with 32 CPUs by a factor of 2 > (~10 sec vs ~20 sec). 10 seconds to start a QEMU with a mere 32 cpus is still a totally ridiculous amount of time. Do you know why it is still so slow even after your suggested patch ? Is it still related to the method object_property_add(), or are there other areas of code with bad scalability affecting arm ? 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 :|