From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJkjT-0004sh-QI for qemu-devel@nongnu.org; Mon, 27 Jul 2015 11:54:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJkjQ-0005d2-GX for qemu-devel@nongnu.org; Mon, 27 Jul 2015 11:54:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJkjQ-0005cv-BM for qemu-devel@nongnu.org; Mon, 27 Jul 2015 11:54:24 -0400 References: <507c11db2c97eef33de0e4f7168076d5c39f0867.1436866326.git.p.fedin@samsung.com> <87r3ntzra9.fsf@blackfin.pond.sub.org> <003201d0c879$8fced800$af6c8800$@samsung.com> <55B646CD.8010808@suse.de> <55B64900.6020008@redhat.com> <007201d0c87f$9b3e5660$d1bb0320$@samsung.com> From: Paolo Bonzini Message-ID: <55B64CC2.6000307@redhat.com> Date: Mon, 27 Jul 2015 17:22:42 +0200 MIME-Version: 1.0 In-Reply-To: <007201d0c87f$9b3e5660$d1bb0320$@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin , =?UTF-8?Q?'Andreas_F=c3=a4rber'?= , 'Markus Armbruster' Cc: qemu-devel@nongnu.org On 27/07/2015 17:19, Pavel Fedin wrote: >>> I'm just asking myself whether this is really necessary. Is the >>> automagic [*] really needed in this case? > In this particular case, perhaps, not. However, this automagic is > used not only with GPIOs. It is used also with memory regions, as > well as with some other places. Also, i thought that there could be > some hard to notice problems, when, for example, we first add > unnamed-gpio-in[0...1023], then add another 1024 pins, where count > again goes from 0 to 1023. And we would get collision and failure, > unless we know, that we already have 1024 objects with this name. But IIUC qdev_init_gpio_in/out (the non-named variants) should only be called once. So if it breaks it's a feature. Paolo > So, > just for better safety, i decided to fix the mechanism itself instead > of changing use cases.