From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujpI-0004Bs-Jm for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WujpC-0006rR-GP for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:48:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujpC-0006rI-81 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:48:26 -0400 Message-ID: <53986C34.3060303@redhat.com> Date: Wed, 11 Jun 2014 16:48:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1402489176-19738-1-git-send-email-pbonzini@redhat.com> <1402489176-19738-10-git-send-email-pbonzini@redhat.com> <53986475.8050303@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 09/13] memory: MemoryRegion: QOMify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: "qemu-devel@nongnu.org Developers" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Il 11/06/2014 16:32, Peter Crosthwaite ha scritto: >> > In the end, I believe the conceptual cleanliness of destroy==unparent, and >> > the removal of 200-odd memory_region_destroy calls, are worth the extra ugly >> > [0]'s. >> > > I think you get to keep the uniqueness though under my latest > proposal? No tree-wide collision resolution needed. When > object_property_add_child_array sucessfully sets something to [0] (i > == 0 iteration), just create an alias without [] at the same time. The > naming system will behave identically to this patch as-is in all the > collision cases (i >= 1). Yes, but then you get duplicates, and some of them are wrong (the ones without [0] if there is also a [1]). I think the solution could be to special case names ending with "[*]" (perhaps straight in object_property_add_child!), and then audit manually at all the 400+ init calls. For now I'd rather keep it simple. Paolo