WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Use freeze/thaw/restore PM events for Guest susp

To: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Use freeze/thaw/restore PM events for Guest suspend/resume/checkpoint
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 14 Feb 2011 19:06:11 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 14 Feb 2011 11:11:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110214162101.24495.80285.stgit@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <20110214162101.24495.80285.stgit@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-02-14 at 16:21 +0000, Shriram Rajagopalan wrote:
> Use PM_FREEZE, PM_THAW and PM_RESTORE power events for
> suspend/resume functionality, instead of PM_SUSPEND and
> PM_RESUME. Use of these pm events also fixes the Xen Guest
> hangup when taking checkpoints. When a suspend event is cancelled
> (i.e. while taking checkpoints once/continuously), we use PM_THAW
> instead of PM_RESUME. PM_RESTORE is used when suspend is not
> cancelled. See Documentation/power/devices.txt and linux/pm.h
> for more info about freeze, thaw and restore. The sequence of
> pm events in a suspend-resume scenario is shown below.
> 
>       dpm_suspend_start(PMSG_FREEZE);
> 
>               dpm_suspend_noirq(PMSG_FREEZE);
> 
>                        sysdev_suspend(PMSG_FREEZE);
>                        cancelled = suspend_hypercall()
>                        sysdev_resume();
> 
>                dpm_resume_noirq(cancelled ? PMSG_THAW : PMSG_RESTORE);
> 
>        dpm_resume_end(cancelled ? PMSG_THAW : PMSG_RESTORE);

Thanks.

Which tree/branch is this against?

Can you please at least do the dev_pm_ops as a separate patch to allow
bisectability etc. (generally each patch should be a single logical
change so if the remaineder can be sensibly split too it is worth doing
so).

Did you test regular save/restore as well as cancelled migrations? What
about PVHMV guests?

> +static struct dev_pm_ops xenbus_pm_ops = {
> +     .suspend = xenbus_dev_suspend,
> +     .resume  = xenbus_dev_resume,
> +     .freeze  = xenbus_dev_suspend,
> +     .thaw    = xenbus_dev_cancel,
> +     .restore = xenbus_dev_resume,
> +};

Perhaps xenbus_dev_thaw?

Are suspend/freeze and resume/restore really the same?

Once we've transitioned to the PMSG_FREEZE way of doing things do we
still need to keep the other hooks around? If not then the other ones
could be renamed as well?

On Mon, 2011-02-14 at 16:24 +0000, Shriram Rajagopalan wrote:
> parts of this patch were based on Kazuhiro Suzuki's initial patch to
> fix the same issue. Refer to
> http://lists.xensource.com/archives/html/xen-devel/2011-02/msg00371.html
> for further details.

It's worth mentioning this in the commit message, also please CC
Kazuhiro since he has been working on this too, has a repro scenario
etc.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel