From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcbc9-0006G5-GF for qemu-devel@nongnu.org; Sun, 25 Nov 2012 07:47:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tcbc8-0003A6-JH for qemu-devel@nongnu.org; Sun, 25 Nov 2012 07:47:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcbc8-0003A2-Bl for qemu-devel@nongnu.org; Sun, 25 Nov 2012 07:47:12 -0500 Message-ID: <50B2134C.7000906@redhat.com> Date: Sun, 25 Nov 2012 14:47:08 +0200 From: Avi Kivity MIME-Version: 1.0 References: <509627A2.3040509@web.de> <5096C044.7060504@redhat.com> <50975C27.5010906@web.de> <509774ED.6040104@redhat.com> <50977E1A.1070105@siemens.com> <5097B203.30207@redhat.com> <5097B302.3080203@siemens.com> <50B1F093.80901@redhat.com> <50B1F6B0.9040005@web.de> In-Reply-To: <50B1F6B0.9040005@web.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: Reintroduce dirty flag to optimize changes on disabled regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , qemu-devel On 11/25/2012 12:45 PM, Jan Kiszka wrote: > On 2012-11-25 11:18, Avi Kivity wrote: >> On 11/05/2012 02:37 PM, Jan Kiszka wrote: >>>> >>>> As I noted, init and destroy cannot cause a topology update. >>> >>> Ah, right. Why are we wrapping them in transaction_begin/commit at all then? >>> >> >> We aren't. >> >> >> void memory_region_destroy(MemoryRegion *mr) >> { >> assert(QTAILQ_EMPTY(&mr->subregions)); >> assert(memory_region_transaction_depth == 0); >> > > We were talking about address_space_init/destroy. This is to force a re-rendering of the address space, so that listeners see the construction/destruction. Simply assigning as->root wouldn't do that. This kind of reliance on side effects should be documented with a comment (and forbidden to anything that is outside the implementation). My bad. -- error compiling committee.c: too many arguments to function