From: Ian Jackson Subject: Re: [PATCH 18/19] libxl: suspend: Async evtchn wait Date: Thu, 13 Mar 2014 18:36:58 +0000 Message-ID: <21281.64202.954134.409597@mariner.uk.xensource.com> References: <1393945016-1417-1-git-send-email-ian.jackson@eu.citrix.com> <1393945016-1417-19-git-send-email-ian.jackson@eu.citrix.com> <1394731404.16364.33.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1394731404.16364.33.camel@kazak.uk.xensource.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 Campbell Cc: Shriram Rajagopalan , xen-devel@lists.xensource.com, Lai Jiangshan , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH 18/19] libxl: suspend: Async evtchn wait"): > On Tue, 2014-03-04 at 14:56 +0000, Ian Jackson wrote: > > When negotiating guest suspend via the evtchn ("fast") protocol, > > abolish synchronous wait for domain suspend. > > [stuff] > > Neither of the above comments necessitate a change (although you could > clarify the commit message if you were so inclined): > Acked-by: Ian Campbell Thanks. Good idea. Here's the new one. Ian. libxl: suspend: Async evtchn wait When negotiating guest suspend via the evtchn ("fast") protocol, abolish synchronous wait for domain suspend. If the guest supports the event channel suspend protocol, we used to sit in a loop in xc_await_suspend waiting (perhaps indefinitely) for it to suspend. Instead, use the new libxl event channel event facility. When we see that the event is signaled, we look at the domain to see if it has suspended. (In this patch we do not yet set a timeout; that will come next.) So the suspend operation no longer blocks with the libxl ctx lock held, and instead returns to the event loop. Additionally, domains which signal the event channel themselves, or undergo other state changes, will be handled more correctly. We end up making a few more hypercalls. Also, if we encounter errors setting up the suspend event channel (which should not happen), abort the operation rather than falling back to the xenstore protocol. Signed-off-by: Ian Jackson CC: Stefano Stabellini Acked-by: Ian Campbell --- v4: Improve commit message.