public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Maitin-Shepard <jbms@cmu.edu>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jeremy Maitin-Shepard <jmaitins@andrew.cmu.edu>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
	Nigel Cunningham <nigel@nigel.suspend2.net>
Subject: Re: A kexec approach to hibernation
Date: Mon, 11 Jun 2007 11:07:54 -0400	[thread overview]
Message-ID: <87zm36msvp.fsf@jbms.ath.cx> (raw)
In-Reply-To: <20070604225143.GF2711@elf.ucw.cz> (Pavel Machek's message of "Tue\, 5 Jun 2007 00\:51\:43 +0200")

Pavel Machek <pavel@ucw.cz> writes:

[snip]

>> > If _I_ were willing to add some runtime overhead to make hibernation
>> > simpler, I'd just use some virtualization to do that... with added
>> > advantage of "hibernate here, resume on different hw".
>> 
>> I don't believe there is going to be any runtime overhead.

> 64MB less memory seems like runtime overhead for me. If you know how
> to do kexec without pre-reserving memory, I believe kexec/kdump team
> will be interested.

The main reason kdump needs to reserve memory at boot is that it needs
to preload the crashdump kernel into memory so that it will be available
on panic (and however much memory the crashdump kernel will need to run
will also need to be available at all times, since a panic can occur at
any time), and also because no attempt is made to shutdown devices on
panic, and consequently devices may clobber existing memory with ongoing
DMA, so a reserved area of memory must be used by the crashdump kernel.

For hibernate via kexec, however, these issues do not exist.  The
simplest solution would be to simply backup the first say 16MB or 64MB
(or however much is desired for the "save" kernel to have) of memory
into free pages just before copying the "save" kernel into the desired
position and jumping to it.

Due to the speed of memory copying, this should not add any significant
overhead.

[snip]

-- 
Jeremy Maitin-Shepard

  reply	other threads:[~2007-06-11 15:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 20:39 A kexec approach to hibernation Jeremy Maitin-Shepard
2007-06-01 21:39 ` Rafael J. Wysocki
2007-06-01 22:25   ` Jeremy Maitin-Shepard
2007-06-01 23:14     ` Rafael J. Wysocki
2007-06-01 23:54       ` Jeremy Maitin-Shepard
2007-06-02  0:33         ` Rafael J. Wysocki
2007-06-02  1:54           ` Jeremy Maitin-Shepard
2007-06-02  9:22             ` Rafael J. Wysocki
2007-06-04 10:46             ` Pavel Machek
2007-06-04 12:20               ` Matthew Garrett
2007-06-04 13:10                 ` Pavel Machek
2007-06-04 13:16                   ` Matthew Garrett
2007-06-11  2:02                     ` H. Peter Anvin
2007-06-11 22:44                       ` Nigel Cunningham
2007-06-04 22:09               ` Jeremy Maitin-Shepard
2007-06-04 22:36                 ` Nigel Cunningham
2007-06-05  8:15                   ` Xavier Bestel
2007-06-05  9:34                     ` Stefan Seyfried
2007-06-05  9:40                       ` Xavier Bestel
2007-06-04 22:51                 ` Pavel Machek
2007-06-11 15:07                   ` Jeremy Maitin-Shepard [this message]
2007-06-11  3:40             ` Nigel Cunningham
2007-06-11 15:01               ` Jeremy Maitin-Shepard
2007-06-11 15:45                 ` Xavier Bestel
2007-06-11 15:51                   ` Jeremy Maitin-Shepard
2007-06-11 16:03                     ` Xavier Bestel
2007-06-11 17:05                       ` Jeremy Maitin-Shepard
2007-06-04  4:40         ` Vivek Goyal
2007-06-04  5:22           ` Nigel Cunningham
2007-06-04  8:05             ` Rafael J. Wysocki
2007-06-04  8:14               ` Nigel Cunningham
2007-06-04 21:44             ` Jeremy Maitin-Shepard

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=87zm36msvp.fsf@jbms.ath.cx \
    --to=jbms@cmu.edu \
    --cc=jmaitins@andrew.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=torvalds@osdl.org \
    /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