From patchwork Thu Feb 17 07:56:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shriram Rajagopalan X-Patchwork-Id: 570761 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1HGpNgh001706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 17 Feb 2011 16:51:44 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p1HGno5M024365; Thu, 17 Feb 2011 08:49:50 -0800 Received: from smtp.cs.ubc.ca (smtp.cs.ubc.ca [142.103.6.52]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p1H7uBpu006306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Feb 2011 23:56:13 -0800 Received: from localhost.localdomain ([198.162.52.240]) (authenticated bits=0) by smtp.cs.ubc.ca (8.14.3/8.13.6) with ESMTP id p1H7u52w014633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Feb 2011 23:56:11 -0800 From: Shriram Rajagopalan To: linux-pm@lists.linux-foundation.org Date: Wed, 16 Feb 2011 23:56:03 -0800 Message-Id: <1297929363-27183-1-git-send-email-rshriram@cs.ubc.ca> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <201102101801.20345.rjw@sisk.pl> References: <201102101801.20345.rjw@sisk.pl> Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-6.312 required=5 tests=BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED, PATCH_SUBJECT_OSDL X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 X-Mailman-Approved-At: Thu, 17 Feb 2011 08:49:19 -0800 Cc: xen-devel@lists.xensource.com Subject: [linux-pm] [PATCH] update comments in pm.h describing Xen Guest save/restore/checkpoint use case X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 17 Feb 2011 16:51:44 +0000 (UTC) diff --git a/include/linux/pm.h b/include/linux/pm.h index dd9c7ab..2ddd9d3 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -516,6 +516,25 @@ extern void update_pm_runtime_accounting(struct device *dev); * well as during system sleep states like PM_SUSPEND_STANDBY. They may * be able to use wakeup events to exit from runtime low-power states, * or from system low-power states such as standby or suspend-to-RAM. + * + * Xen Guest Kernels use PM_FREEZE, PM_RESTORE and PM_THAW to implement + * VM save/restore/checkpoint functionality. Save and Restore are somewhat + * similar to hibernate functionality. The sequence of events 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); + * + * If the syspend_hypercall returns 1, it means that the VM was merely + * checkpointed (akin to THAW). If it returns 0, it means the system has been + * fully restored from its on-disk snapshot (akin to RESTORE). */ #ifdef CONFIG_PM_SLEEP