From: Ian Jackson Subject: Re: [PATCH v2-resend 22/30] libxl: ocaml: event management [and 1 more messages] Date: Tue, 12 Nov 2013 17:18:59 +0000 Message-ID: <21122.25347.261288.209964@mariner.uk.xensource.com> References: <1383760205-20397-1-git-send-email-rob.hoes@citrix.com> <1383760205-20397-19-git-send-email-rob.hoes@citrix.com> <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-23-git-send-email-rob.hoes@citrix.com> <21020.59469.965364.832725@mariner.uk.xensource.com> <21120.60611.692531.460725@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D16EB79@AMSPEX01CL03.citrite.net> <21122.16826.622192.625659@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D16FDE1@AMSPEX01CL03.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <360717C0B01E6345BCBE64B758E22C2D16FDE1@AMSPEX01CL03.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rob Hoes Cc: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("RE: [Xen-devel] [PATCH v2-resend 22/30] libxl: ocaml: event management [and 1 more messages]"): > [Ian Jackson:] > > Have you considered this problem ? > > Yes, I have encountered such deadlocks, and got around them by > making all calls into libxl mutually exclusive. This should mean > that there can be only one thread at a time holding or waiting for > the libxl lock, and I think that avoids the deadlock you > described. It seems to be running smoothly now in our test setup. I'm not sure how that would help. libxl already has a mutex which it takes on entry, so all calls into libxl are already mututally exclusive. What would happen if your fd registration callback ocaml code tried to make a libxl call ? Ian.