From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkCkE-0000YZ-TT for qemu-devel@nongnu.org; Wed, 05 Jun 2013 08:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkCk9-0005TW-O1 for qemu-devel@nongnu.org; Wed, 05 Jun 2013 08:23:14 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59738 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkCk9-0005TG-Cy for qemu-devel@nongnu.org; Wed, 05 Jun 2013 08:23:09 -0400 Message-ID: <51AF2DA7.1060605@suse.de> Date: Wed, 05 Jun 2013 14:23:03 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1370371954-8479-1-git-send-email-pbonzini@redhat.com> <51AF09FC.50308@suse.de> <20130605111044.GL31830@redhat.com> <51AF21C1.3060503@suse.de> <20130605120656.GC2643@redhat.com> In-Reply-To: <20130605120656.GC2643@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 00/39] Delay destruction of memory regions to instance_finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori , Jesse Larrew Am 05.06.2013 14:06, schrieb Michael S. Tsirkin: > On Wed, Jun 05, 2013 at 01:32:17PM +0200, Andreas F=E4rber wrote: >> Am 05.06.2013 13:10, schrieb Michael S. Tsirkin: >>> On Wed, Jun 05, 2013 at 11:50:52AM +0200, Andreas F=E4rber wrote: >>>> Am 04.06.2013 20:51, schrieb Paolo Bonzini: >>>>> This series changes all PCI devices (the sole to support hotplug >>>>> _and_ use MemoryRegions) to do memory_region_del_subregion at >>>>> unrealize time, and memory_region_destroy at instance_finalize >>>>> time. >>>> >>>> The general idea looks good. >>>> >>>> Could you please follow-up with a patch that switches from exit to >>>> unrealize? >>> >>> What do you guys think about changing the name to something >>> else e.g. "free" or "destroy"? >> >> I'm not generally opposed to renaming things, but current unrealize is= a >> pair with realize, and destroy or free doesn't really fit it's purpose= - >> that's instance_finalize. Let's CC Anthony. >=20 > So @instance_init -> instance_alloc No, allocation happens before instance_init, it only initializes fields of the instance, so that name seems good to me. My ISA realize patches (need to respin after Paolo enabled gus) worked towards resolving the DeviceClass::init vs. instance_init ambiguity, so once completed only instance_init and class_init would remain as "init"s. PCI is a bit more involved, and would collide with this series; Jesse's virtio-net config size issue is calling for converting VirtioDevice, which might be quicker. > instance_finalize -> @instance_free? /me misunderstandable, sorry. It doesn't free the instance either, and Java uses "finalize" too and so does .NET iirc. Anyway, my point was, when moving stuff out of exit, we should also change the signature to the new one - DeviceState* and (unused) Error**. Then we're getting closer to removing the old exit field, and at that point renaming individual hooks - if desired - becomes a trivial patch. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg