From: Ian Campbell Subject: Re: [PATCH 06/23] libxl: init: libxl__poller_init and _get take gc Date: Thu, 19 Dec 2013 13:00:52 +0000 Message-ID: <1387458052.9925.65.camel@kazak.uk.xensource.com> References: <1387305337-15355-1-git-send-email-ian.jackson@eu.citrix.com> <1387305337-15355-7-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1387305337-15355-7-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Shriram Rajagopalan , George Dunlap , xen-devel@lists.xensource.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2013-12-17 at 18:35 +0000, Ian Jackson wrote: > @@ -1622,7 +1617,7 @@ libxl__ao *libxl__ao_create(libxl_ctx *ctx, uint32_t domid, > if (how) { > ao->how = *how; > } else { > - ao->poller = libxl__poller_get(ctx); > + ao->poller = libxl__poller_get(&ao->gc); this is a bit subtle, libxl__poller_get would previously have gotten the toplevel ctx gc and not the ao-gc, if it had thought to init a GC at all. It only actually uses whatever it gets for logging, so that's ok, but I'm not sure which would be the correct/expected gc to use. I take it you considered this? libxl__poller_get does a NOGC allocation and the associated manual memory mgmt -- now that it has the ao->gc in hand could it use that? Is the poller's lifecycle entirely contained within the ao? Ian.