All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Use freeze/thaw/restore PM events for Guest suspend/resume/checkpoint
Date: Mon, 14 Feb 2011 19:06:11 +0000	[thread overview]
Message-ID: <1297710371.26452.6.camel@localhost.localdomain> (raw)
In-Reply-To: <20110214162101.24495.80285.stgit@athos.nss.cs.ubc.ca>

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.

  parent reply	other threads:[~2011-02-14 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 16:21 [PATCH] Use freeze/thaw/restore PM events for Guest suspend/resume/checkpoint Shriram Rajagopalan
2011-02-14 16:24 ` Shriram Rajagopalan
2011-02-14 19:06 ` Ian Campbell [this message]
2011-02-14 21:47   ` Shriram Rajagopalan
2011-02-15  9:41     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297710371.26452.6.camel@localhost.localdomain \
    --to=ian.campbell@citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.