From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 11 of 12] xenpaging: add watch thread to catch guest shutdown Date: Tue, 7 Jun 2011 21:07:20 +0200 Message-ID: <20110607190720.GA9335@aepfle.de> References: <9484d35ec6e802aa3727.1307440393@probook.site> <1307442185.775.552.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <1307442185.775.552.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, Jun 07, Ian Campbell wrote: > The correct way to watch for domain shutdown is to watch the special > "@releaseDomain" node. IIRC this notifies you when _any_ domain has > shutdown so you need to check for the domain you are actually interested > in. Doing this also removes the need for the hacky extra xs_read_watch > which you have -- which seems very racy to me and is almost certainly > incorrect. Thanks for the feedback, I have updated my patch to use this interface. > Lastly I don't think you need a new thread for this, you can integrate > the xs fd (from xs_fileno()) into your existing poll loop from > xc_wait_for_event_or_timeout (which is a terrible name for a function > which isn't in libxc, this should either be moved into the library or > renamed depending on it's actual use cases. Same for the other xc_* in > xenpaging...) All of xc.c can be removed. If patches 1-10 are ok, can you apply them? I will send another series to remove xc.c, which will also contain the changes from patch 11 and 12. Olaf