public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@intel.com>
To: Len Brown <lenb@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>,
	nigel@nigel.suspend2.net, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	linux-pm@lists.linux-foundation.org,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH -mm 2/2] kexec jump -v11: save/restore device state
Date: Wed, 11 Jun 2008 17:46:24 +0800	[thread overview]
Message-ID: <1213177584.17610.0.camel@caritas-dev.intel.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0806110418370.4233@localhost.localdomain>

On Wed, 2008-06-11 at 04:21 -0400, Len Brown wrote:
> On Wed, 11 Jun 2008, Huang, Ying wrote:
> > On Tue, 2008-06-10 at 14:01 -0400, Len Brown wrote:
> > > 
> > > On Tue, 10 Jun 2008, Huang, Ying wrote:
> > > 
> > > > This patch implements devices state save/restore before after kexec.
> > > > 
> > > > 
> > > > This patch together with features in kexec_jump patch can be used for
> > > > following:
> > > > 
> > > > - A simple hibernation implementation without ACPI support. You can
> > > >   kexec a hibernating kernel, save the memory image of original system
> > > >   and shutdown the system. When resuming, you restore the memory image
> > > >   of original system via ordinary kexec load then jump back.
> > > 
> > > What part of ACPI's role in hibernation are you trying to avoid
> > > 1. enabling wake devices
> > > 2. removing power from the system
> > > 3. something else?
> > 
> > ACPI S5 is used instead of S4 for this simple hibernation
> > implementation. That is, before creating the hibernation image, the ACPI
> > _PTS is not executed, devices are not put into low power state and wake
> > devices are not enabled. After creating the hibernation image, the image
> > is saved to disk and system is shutdown (go to S5). When resuming from
> > hibernated image, ACPI _BFS and _WAK are not executed too.
> 
> Doesn't that resume the devices and their drivers into an unknown state?

device_suspend(PMSG_FREEZE) and device_power_down(PMSG_FREEZE) are
called before hibernation; device_power_up(PMSG_RESTORE) and
device_resume(PMSG_RESTORE) are called after restore. The new
hibernation/restore device driver callbacks introduced by Rafael is
used. So I think the device/driver state will be saved/restored
properly.

It is planed to support ACPI S4 in the future. But I think a hibernation
scheme without ACPI may be useful in some situation too.

Best Regards,
Huang Ying


  reply	other threads:[~2008-06-11  9:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  7:15 [PATCH -mm 2/2] kexec jump -v11: save/restore device state Huang, Ying
2008-06-10 18:01 ` [linux-pm] " Len Brown
2008-06-11  1:01   ` Huang, Ying
2008-06-11  8:21     ` Len Brown
2008-06-11  9:46       ` Huang, Ying [this message]
2008-06-13 18:05     ` Vivek Goyal
2008-06-16  1:29       ` Huang, Ying
2008-06-11 16:30 ` Vivek Goyal
2008-06-12  0:53   ` Huang, Ying
2008-06-12 13:02     ` Vivek Goyal
2008-06-13  1:18       ` Huang, Ying

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=1213177584.17610.0.camel@caritas-dev.intel.com \
    --to=ying.huang@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=vgoyal@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox