This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH] libxenlight: clone context to avoid GC corruptio

To: Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] libxenlight: clone context to avoid GC corruption
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 3 Dec 2009 15:18:10 +0000
Cc: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 03 Dec 2009 07:14:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091203151110.GA16650@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4B16E586.7060505@xxxxxxxxxxxxxxxx> <20091203151110.GA16650@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Thu, 3 Dec 2009, Vincent Hanquez wrote:
> On Wed, Dec 02, 2009 at 10:09:10PM +0000, Andres Lagar-Cavilla wrote:
> > Provide a function to clone a context. This is necessary
> > because simply copying the structs will eventually
> > corrup the GC: maxsize is updated in the cloned context
> > but not in the originating one, yet they have the same
> > array of referenced pointers alloc_ptrs.
> I think this doesn't answer the question of why you need this function
> at all. I don't think you should clone the context nor share it.
At the moment we need to clone the context in few places to open a new
xenstore connection and add temporary watches on xenstore nodes to
synchronously wait for events.

It is a simple solution to avoid conflicts when reading watches and I
think is OK as long as we don't have too many of these temporary watches
(we only have two places right now). 

Xen-devel mailing list