From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Al Boldi <a1426z@gawab.com>
Cc: david@lang.hm, linux-kernel@vger.kernel.org,
Kyle Moffett <mrmacman_g4@mac.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Machek <pavel@ucw.cz>, "Huang, Ying" <ying.huang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Jeremy Maitin-Shepard <jbms@cmu.edu>
Subject: Re: Hibernation considerations
Date: Tue, 17 Jul 2007 16:18:59 +0200 [thread overview]
Message-ID: <200707171619.00868.rjw@sisk.pl> (raw)
In-Reply-To: <200707171508.06921.a1426z@gawab.com>
On Tuesday, 17 July 2007 14:08, Al Boldi wrote:
> david@lang.hm wrote:
> > On Mon, 16 Jul 2007, Al Boldi wrote:
> > > We have to go through ACPI, for wakeup functions to succeed. A simple
> > > power-off won't do.
> >
> > the kexec switch being posted requires ACPI be disabled, so it's clearly
> > possible to switch kernels and initialize devices without ACPI
>
> It's a given that kexec works in the absence of ACPI; what we have to handle
> is the ACPI states across kernel invocations, to ensure wakeup functions
> succeed. If you don't need this, then just power off.
>
> > >> suspend-to-disk-and-ram could be implemented as three
> > >> seperate steps
> > >>
> > >> 1. suspend-to-disk
> > >>
> > >> 2. resume-from-disk
> > >>
> > >> 3. suspend-to-ram
> > >>
> > >> followed by either
> > >>
> > >> 4. resume-from-ram
> > >>
> > >> or
> > >>
> > >> 4. battery dies and loptop powers off completely
> > >>
> > >> 5. power-on boot.
> > >>
> > >> 6. resume-from-disk
> > >>
> > >> all that you need to do is to make sure that the system doesn't run
> > >> anything that would affect permanent media or the outside world between
> > >> steps #2 and #3
> > >
> > > Exactly, which is why your scheme would break down on #3, and that's why
> > > you need to call S3 from within the kexec'd hibernation kernel after
> > > saving the hibernation image.
> >
> > when a kexec is called, how does the kernel know what to execute?
> > something needs to tell it what to do, and I think that something is
> > either something in the kexec image, or it's something passed as a
> > parameter to that image.
> >
> > all that would be needed to do #3 safely is to have the kernel that you
> > restarted on #2 do a suspend-to-ram before it does anything else.
>
> If you mean by kernel 'the normal kernel', then this won't work, because it
> would imply a change of state after saving its image.
>
> If you mean by kernel 'the kexec'd hibernation kernel', then you wouldn't
> need to do #2, but rather do #3 right after dumping the image in #1.
>
> [...insert from another post...]
> > > BTW, it would be really helpful if people would actually try the kexec
> > > hibernation patches, as this may yield a much more constructive
> > > discussion.
> >
> > I would love to, but so far I don't see the nessasary pieces
> >
> > once I kexec to the new kernel, how can it find out what pages of memory
> > (and swap) need to be saved?
>
> No need to save the swap,
Correct.
> all you need to do is to dump /dev/oldmem onto storage,
I'm not sure of that.
> and if that dump image is compatible with swsusp,
No, it's not. swusp additionally needs to know PFNs to restore the pages into.
> then a normal kernel should be able to resume from this image via
> /dev/snapshot.
Nope.
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-07-17 14:18 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.0707151918340.30402-100000@netrider.rowland.org>
2007-07-15 23:58 ` Hibernation considerations david
2007-07-16 5:02 ` Al Boldi
[not found] ` <200707160802.46567.a1426z@gawab.com>
2007-07-16 6:49 ` david
2007-07-16 13:32 ` Al Boldi
[not found] ` <200707161632.02334.a1426z@gawab.com>
2007-07-17 4:33 ` david
2007-07-17 12:08 ` Al Boldi
[not found] ` <200707171508.06921.a1426z@gawab.com>
2007-07-17 14:18 ` Rafael J. Wysocki [this message]
2007-07-17 15:23 ` david
2007-07-16 14:53 ` Alan Stern
[not found] <Pine.LNX.4.44L0.0707171835560.8690-100000@iolanthe.rowland.org>
2007-07-17 22:37 ` david
2007-07-18 14:29 ` Alan Stern
2007-07-18 14:47 ` Rafael J. Wysocki
[not found] ` <200707181647.32620.rjw@sisk.pl>
2007-07-20 4:40 ` Al Boldi
[not found] ` <200707200740.38158.a1426z@gawab.com>
2007-07-20 10:59 ` Rafael J. Wysocki
[not found] <Pine.LNX.4.44L0.0707171416120.3728-100000@iolanthe.rowland.org>
2007-07-17 20:17 ` Rafael J. Wysocki
2007-07-17 20:27 ` david
2007-07-17 21:20 ` Rafael J. Wysocki
2007-07-17 22:38 ` Alan Stern
[not found] ` <200707172217.01890.rjw@sisk.pl>
2007-07-17 20:34 ` david
2007-07-17 20:54 ` Jeremy Maitin-Shepard
[not found] ` <87fy3mg39r.fsf@jbms.ath.cx>
2007-07-17 21:04 ` david
[not found] ` <200707172323.51702.rjw@sisk.pl>
2007-07-17 21:17 ` david
2007-07-17 21:27 ` Jeremy Maitin-Shepard
2007-07-17 21:43 ` Rafael J. Wysocki
[not found] ` <871wf6g1q1.fsf@jbms.ath.cx>
2007-07-17 21:27 ` david
2007-07-17 21:54 ` Rafael J. Wysocki
2007-07-17 21:45 ` Rafael J. Wysocki
2007-07-17 21:23 ` Rafael J. Wysocki
2007-07-17 20:34 ` Jeremy Maitin-Shepard
[not found] ` <87odiag45q.fsf@jbms.ath.cx>
2007-07-17 20:37 ` david
2007-07-17 20:56 ` Jeremy Maitin-Shepard
[not found] ` <87bqeag369.fsf@jbms.ath.cx>
2007-07-17 21:06 ` david
[not found] ` <Pine.LNX.4.64.0707171404330.2467@asgard.lang.hm>
2007-07-17 21:40 ` Rafael J. Wysocki
2007-07-17 21:24 ` Rafael J. Wysocki
2007-07-17 21:11 ` Rafael J. Wysocki
[not found] <Pine.LNX.4.44L0.0707161045520.3410-100000@iolanthe.rowland.org>
2007-07-16 16:51 ` Al Boldi
[not found] ` <200707161951.35225.a1426z@gawab.com>
2007-07-17 4:37 ` david
[not found] <Pine.LNX.4.44L0.0707161013440.3410-100000@iolanthe.rowland.org>
2007-07-16 15:25 ` Rafael J. Wysocki
[not found] <Pine.LNX.4.64.0707151633240.25614@asgard.lang.hm>
2007-07-16 14:21 ` Alan Stern
2007-07-17 4:45 ` david
2007-07-17 14:15 ` Alan Stern
2007-07-17 14:40 ` Rafael J. Wysocki
[not found] ` <200707171640.39955.rjw@sisk.pl>
2007-07-17 15:29 ` david
2007-07-17 16:02 ` Rafael J. Wysocki
[not found] ` <200707171802.30903.rjw@sisk.pl>
2007-07-17 17:06 ` david
[not found] ` <Pine.LNX.4.64.0707170959160.2467@asgard.lang.hm>
2007-07-17 19:50 ` Rafael J. Wysocki
[not found] ` <200707172150.44417.rjw@sisk.pl>
2007-07-17 20:18 ` david
2007-07-17 20:39 ` Jeremy Maitin-Shepard
2007-07-17 20:57 ` Rafael J. Wysocki
2007-07-17 20:53 ` david
2007-07-17 21:37 ` Rafael J. Wysocki
[not found] ` <200707172337.24683.rjw@sisk.pl>
2007-07-17 21:42 ` david
2007-07-17 21:53 ` Jeremy Maitin-Shepard
[not found] ` <87k5syg3yi.fsf@jbms.ath.cx>
2007-07-17 20:39 ` david
2007-07-17 20:58 ` Rafael J. Wysocki
2007-07-21 10:25 ` Pavel Machek
[not found] ` <20070721102520.GE1902@elf.ucw.cz>
2007-07-21 15:35 ` Jeremy Maitin-Shepard
2007-07-21 17:56 ` Pavel Machek
[not found] ` <20070721175639.GA3701@elf.ucw.cz>
2007-07-21 19:35 ` david
2007-07-21 19:49 ` Pavel Machek
[not found] ` <20070721194906.GC3701@elf.ucw.cz>
2007-07-21 22:14 ` david
2007-08-01 16:58 ` Stefan Seyfried
2007-07-17 20:24 ` Jeremy Maitin-Shepard
2007-07-17 20:44 ` david
2007-07-17 21:00 ` Rafael J. Wysocki
2007-07-17 16:09 ` Jeremy Maitin-Shepard
2007-07-17 18:32 ` Alan Stern
[not found] ` <87hco3ypt5.fsf@jbms.ath.cx>
2007-07-17 19:54 ` Rafael J. Wysocki
2007-07-21 10:17 ` Pavel Machek
[not found] <200707160938.16037.nigel@nigel.suspend2.net>
2007-07-16 14:15 ` Alan Stern
[not found] <Pine.LNX.4.44L0.0707151915570.28934-100000@netrider.rowland.org>
2007-07-15 23:53 ` david
2007-07-16 5:18 ` Jeremy Maitin-Shepard
[not found] <Pine.LNX.4.44L0.0707151914450.28934-100000@netrider.rowland.org>
2007-07-15 23:38 ` Nigel Cunningham
2007-07-15 23:41 ` david
[not found] <200707152040.33836.a1426z@gawab.com>
2007-07-15 23:28 ` Alan Stern
[not found] <Pine.LNX.4.44L0.0707151220570.24011-100000@netrider.rowland.org>
2007-07-15 17:40 ` Al Boldi
2007-07-15 19:52 ` david
[not found] <200707151433.34625.rjw@sisk.pl>
2007-07-15 12:51 ` Nigel Cunningham
2007-07-15 12:58 ` Dr. David Alan Gilbert
[not found] ` <200707151810.33554.a1426z@gawab.com>
2007-07-15 15:35 ` jimmy bahuleyan
2007-07-15 16:29 ` Alan Stern
[not found] ` <469A3EB9.8000304@gmail.com>
2007-07-15 17:40 ` Al Boldi
[not found] ` <469A8515.3080109@gmx.de>
2007-07-15 19:46 ` david
2007-07-15 20:13 ` david
[not found] ` <200707160047.28420.rjw@sisk.pl>
2007-07-15 22:42 ` david
2007-07-15 23:15 ` Alan Stern
2007-07-15 23:22 ` Rafael J. Wysocki
[not found] ` <200707160122.09840.rjw@sisk.pl>
2007-07-15 23:49 ` david
2007-07-16 12:06 ` Rafael J. Wysocki
2007-07-16 12:38 ` Jim Crilly
2007-07-16 15:29 ` Rafael J. Wysocki
[not found] ` <200707161729.16440.rjw@sisk.pl>
2007-07-17 4:28 ` david
2007-07-17 10:42 ` Matthew Garrett
[not found] ` <20070717104231.GA32486@srcf.ucam.org>
2007-07-17 15:19 ` david
[not found] ` <Pine.LNX.4.64.0707170818460.19248@asgard.lang.hm>
2007-07-18 2:18 ` Matthew Garrett
[not found] ` <20070718021817.GA13502@srcf.ucam.org>
2007-07-18 3:54 ` david
2007-07-18 11:10 ` Matthew Garrett
[not found] ` <20070718111016.GA18716@srcf.ucam.org>
2007-07-18 12:56 ` david
2007-07-15 22:47 ` Rafael J. Wysocki
2007-07-15 23:17 ` Alan Stern
2007-07-15 20:35 ` Cornelius Riemenschneider
[not found] ` <20070715125855.GA1737@gallifrey>
[not found] ` <200707160038.12943.rjw@sisk.pl>
2007-07-15 22:27 ` david
[not found] ` <Pine.LNX.4.64.0707151526080.25614@asgard.lang.hm>
2007-07-17 17:40 ` Dr. David Alan Gilbert
[not found] ` <20070717174044.GA11212@gallifrey>
2007-07-17 17:49 ` david
2007-07-29 6:53 ` Vojtech Pavlik
[not found] ` <20070729065352.GB17084@suse.cz>
2007-07-29 9:56 ` Rafael J. Wysocki
2007-07-15 22:38 ` Rafael J. Wysocki
2007-07-16 0:51 ` Matthew Garrett
[not found] ` <20070716005135.GB8140@srcf.ucam.org>
2007-07-16 0:51 ` david
2007-07-15 12:33 Rafael J. Wysocki
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=200707171619.00868.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=a1426z@gawab.com \
--cc=akpm@linux-foundation.org \
--cc=david@lang.hm \
--cc=ebiederm@xmission.com \
--cc=jbms@cmu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mrmacman_g4@mac.com \
--cc=pavel@ucw.cz \
--cc=ying.huang@intel.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