From: Ian Jackson Subject: Re: [PATCH 0/3] libxl: Permit immediate asynchronous completion Date: Mon, 20 Feb 2012 13:44:25 +0000 Message-ID: <20290.20025.430801.661854@mariner.uk.xensource.com> References: <1327598457-28261-1-git-send-email-ian.jackson@eu.citrix.com> <1327598457-28261-9-git-send-email-ian.jackson@eu.citrix.com> <20283.43607.571172.475948@mariner.uk.xensource.com> <20286.31877.938411.558236@mariner.uk.xensource.com> <1329504239-19999-1-git-send-email-ian.jackson@eu.citrix.com> <20286.41164.369217.262696@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Roger Pau Monn=E9 writes ("Re: [PATCH 0/3] libxl: Permit immediate asynchro= nous completion"): > > Sorry, Roger, the way I sent this mail omitted you from the CC. > > > >> =A01/3 libxl: ao: allow immediate completion > >> =A02/3 libxl: fix hang due to libxl__initiate_device_remove > >> =A03/3 libxl: Fix eventloop_iteration over-locking > >> > >> Hopefully 1/3 and 2/3 will make the intended behaviour, and the > >> intended usage clear. =A0Sorry for confusing you with a bad example! > = > np, thanks for the quick fix, I would like to test those patches this > afternoon if I have some time and share the results. Thank you, that would be awesome. But note that I haven't executed these myself yet. You will almost certainly want the additional patchlet below - thanks to Ian Campbell's review for spotting the bug. Ian. diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 7b8d0c2..6067dbe 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1233,7 +1233,8 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc); libxl__ctx_lock(ctx); \ libxl__ao *ao =3D libxl__ao_create(ctx, domid, ao_how); \ if (!ao) { libxl__ctx_unlock(ctx); return ERROR_NOMEM; } \ - EGC_INIT(ctx); + libxl__egc egc[1]; LIBXL_INIT_EGC(egc[0],ctx); \ + AO_GC; = #define AO_INPROGRESS ({ \ libxl_ctx *ao__ctx =3D libxl__gc_owner(&ao->gc); \