From: Keir Fraser Subject: Re: [PATCH] serialize suspend-resume process Date: Thu, 31 Jul 2008 14:07:02 +0100 Message-ID: References: <4891B841.2090901@symantec.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4891B841.2090901@symantec.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: BVK Chaitanya Cc: Xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 31/7/08 14:04, "BVK Chaitanya" wrote: >> That isn't true. xen_suspend() can only be re-entered after it has switched >> the 'shutting_down' variable to SHUTDOWN_INVALID. At this point resume work >> is completed (except perhaps for resuming some PV devices via xenbus, which >> is done asynchronously). >> > > This is the case if suspend is invoked through xenbus interface. > > With suspend event channel in place, i see that suspend request doesn't > go through the shutdown_handler function when suspend is triggered over > event channel. Oh, I agree that the shutdown_handler() can be re-entered! But it will *not* trigger multiple invocations of xen_suspend() -- note it stores away the suspend request by performing xchg(&shutting_down, ...) but it does *not* immediately trigger a suspend unless old_state==SHUTDOWN_INVALID (in which case there is no active current invocation of xen_suspend()). -- Keir