From: Ian Jackson Subject: Re: [PATCH 15/19] libxl: suspend: Async xenstore pvcontrol wait Date: Thu, 13 Mar 2014 18:26:30 +0000 Message-ID: <21281.63574.684141.252367@mariner.uk.xensource.com> References: <1393945016-1417-1-git-send-email-ian.jackson@eu.citrix.com> <1393945016-1417-16-git-send-email-ian.jackson@eu.citrix.com> <1394730798.16364.26.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: <1394730798.16364.26.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 15/19] libxl: suspend: Async xenstore pvcontrol wait"): > On Tue, 2014-03-04 at 14:56 +0000, Ian Jackson wrote: > > When negotiating guest suspend via the xenstore pvcontrol protocol > > (ie when the guest does NOT support the evtchn fast suspend protocol): ... > > - /* > > - * Final check for guest acknowledgement. The guest may have > > - * acknowledged while we were cancelling the request in which > > - * case we lost the race while cancelling and should continue. > > This behaviour has gone completely now? No, this possibility still exists. This is handled by the rc == ERROR_TIMEDOUT branch in domain_suspend_common_pvcontrol_suspending. The comment there (now) reads: /* * Guest appears to not be responding. Cancel the suspend * request. * * We re-read the suspend node and clear it within a * transaction in order to handle the case where we race * against the guest catching up and acknowledging the request * at the last minute. */ > > + assert(domain_suspend_pvcontrol_acked(state)); > > LOG(DEBUG, "guest acknowledged suspend request"); > > + > > + libxl__xs_transaction_abort(gc, &t); > > Is this right/proper in the success case? Yes. Because it has then already been committed. This is exactly the pattern from the usage comment for libxl__xs_transaction_* in libxl_internal.h. > If rc != TIMEOUT t may not have been started, although it is initialised > so I suppose this is intended to be ok. Yes. Precisely. Thanks for the careful review :-). Ian.