Date: Fri, 13 Jul 2007 11:17:37 +0200
From: Rafael J. Wysocki <rjw@xxxxxxx>
To: david@xxxxxxx
Cc: Jeremy Maitin-Shepard <jbms@xxxxxxx>,
"Huang, Ying" <ying.huang@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>,
nigel@xxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation
On Friday, 13 July 2007 05:12, david@xxxxxxx wrote:On Thu, 12 Jul 2007, Jeremy Maitin-Shepard wrote:
"Rafael J. Wysocki" <rjw@xxxxxxx> writes:3. Support the in-place kexec? The relocatable kernel is not necessary
if this can be implemented.
4. Image writing/reading. (Only user space application is needed).
And a kernel interface for that application.
I do't understand this statement, this application is just useing the
standard kernel interfaces (block devices to read/write to disk, network
devices to read/write to a server, etc). no new interfaces needed.
Yes, but it will have to know _what_ to save, no?
I agree that a kernel interface would be important; something like
/dev/snapshot that can be read by the "save image" kernel, and written
to by the "restore image" kernel. Note that similarly, kdump provides a
kernel interface to an ELF image of the old kernel.
I thought that the idea was to save the entire contents of ram so that
caches, etc remain populated.
having the system kernel free up ram and then making a sg list of what
memory needs to be backed up would be a nice enhancement, but let's let
that remain a future enhancement until everyone agrees that the basic
approach works.
It's not that easy. :-)
First, there are memory regions that we don't want to save, because the
restoration of them may cause problems (generally all of the reserved pages
fall into this category).
We also don't want to save free RAM and we don't want to save the memory
occupied by the hibernation kernel (ie. the "new" one).
Also, please note that we can't restore 100% of RAM, even if we save it.