From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL9Ob-0000dX-Cs for qemu-devel@nongnu.org; Fri, 31 Jul 2015 08:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZL9OW-0003Ph-Om for qemu-devel@nongnu.org; Fri, 31 Jul 2015 08:26:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZL9OW-0003Pc-KV for qemu-devel@nongnu.org; Fri, 31 Jul 2015 08:26:36 -0400 Date: Fri, 31 Jul 2015 13:26:32 +0100 From: "Daniel P. Berrange" Message-ID: <20150731122631.GG2392@redhat.com> References: <02f101d0cb8b$b1ab9890$1502c9b0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <02f101d0cb8b$b1ab9890$1502c9b0$@samsung.com> Subject: Re: [Qemu-devel] [PATCH v2] Do not use slow [*] expansion for GPIO creation Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: 'Paolo Bonzini' , 'QEMU Developers' , 'Andreas =?utf-8?Q?F=C3=A4rber'?= On Fri, Jul 31, 2015 at 03:23:22PM +0300, Pavel Fedin wrote: > Expansion of [*] suffix is very slow because index expansion is done using > trial and error strategy, starting every time from zero and retrying with > the next index until insertion succeeds. With large number of already added > properties this process takes huge amount of time (O(n^2) complexity). > > Some architectures (like ARM) use very large amount of IRQ pins in interrupt > controller models. This flaw makes machine startup extremely slow > (~20 seconds for ARM64 with 32 CPUs. This patch decreases this time down to > ~10 seconds. > > Also in qdev_init_gpio_out_named() memset() is now called only once for the > whole array instead of per-cell cleaning > > Signed-off-by: Pavel Fedin > --- > hw/core/qdev.c | 21 +++++++++++++++------ > 1 file changed, 15 insertions(+), 6 deletions(-) Reviewed-by: Daniel P. Berrange 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 :|