From: Vivek Goyal <vgoyal@in.ibm.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Machek <pavel@ucw.cz>,
nigel@nigel.suspend2.net,
Andrew Morton <akpm@linux-foundation.org>,
Jeremy Maitin-Shepard <jbms@cmu.edu>,
Alan Stern <stern@rowland.harvard.edu>,
linux-pm@lists.linux-foundation.org,
Kexec Mailing List <kexec@lists.infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 0/2 -mm] kexec based hibernation
Date: Mon, 27 Aug 2007 12:16:04 +0530 [thread overview]
Message-ID: <20070827064604.GD9809@in.ibm.com> (raw)
In-Reply-To: <1188195529.3247.82.camel@caritas-dev.intel.com>
On Mon, Aug 27, 2007 at 02:18:49PM +0800, Huang, Ying wrote:
[..]
> >
> > If one compiles the kernel C to boot from reserved memory area (subset
> > of memory area used by kernel B), then I can skip the step of kexecing
> > from C to D? (COFIG_PHYSICAL_START)
>
> Yes. I think so.
>
> > Alternatively, can we give hint to kernel C to run from a specified address
> > at run time with the help of command line parameters. What I mean boot-loader
> > can load the kernel at any address, but kernel will move itself to run
> > from a different location depending on command line parameter. For example,
> > let say kernel_run_addr = 0x1000000. This parameter will tell the kernel
> > to move itself to 16MB address and run from there. I think it can be made
> > to work with little work in existing setup of relocatable kernel.
> >
> > Kernel run address can be put by some user space script which will save
> > the hibernated image of original kernel. So after saving the /proc/vmcore,
> > script can modify the boot loader config file to append the right
> > command line to the kernel (kernel_run_addr).
> >
> > After hibernation, user will shutdown/reboot. Next time the kernel boots
> > it will load at 16MB addr (because of kernel_run_addr) and then it can
> > restore the previously saved image.
> >
> > We shall have to get rid of (kernel_run_addr) parameter from command
> > line while resuming. One can restore the image (krestore) and then edit
> > the boot loader config file to get rid of command line param, kernel_run_addr.
> >
> > In this scheme, with the help of relocatable kernel, we can use a single
> > kernel for everything. (A, B, C, D). We will also avoid additional kexec
> > from kernel C to kernel D.
> >
> > I think in the long run we shall have to work out so that a user does
> > not have to maintain multiple kernels.
>
> Only one relocatable kernel image is needed. In fact, I use one
> relocatable kernel image in testing during development.
>
> > Does this make sense?
>
> Yes, this is a sensible optimization. But I think it may be better to
> make bootloader load kernel D directly into a specified memory location.
> For example, we can add a option to "kernel" command of grub.
>
IIUC, you mean a command line option which is parsed by boot-loader and
then boot-loader loads the kernel at user specified address?
I think it might not be a very good idea as hibernation becomes boot-loader
dependent scheme. How many boot-loaders will one modify and hibernation
will not work with older versions of boot-loader.
I think it is better to make kernel relocate to user specified address and
keep hibernation mechanism independent of specific boot-loader(grup, lilo,...)
and boot-loader version.
Thanks
Vivek
next prev parent reply other threads:[~2007-08-27 6:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 1:14 [RFC][PATCH 0/2 -mm] kexec based hibernation Huang, Ying
2007-08-27 1:28 ` [linux-pm] " Hu, Fenghua
2007-08-27 2:16 ` Huang, Ying
2007-08-29 2:41 ` Nick Piggin
2007-08-27 5:00 ` Vivek Goyal
2007-08-27 6:18 ` Huang, Ying
2007-08-27 6:46 ` Vivek Goyal [this message]
2007-08-27 7:53 ` Pavel Machek
2007-08-27 13:05 ` Eric W. Biederman
2007-08-27 13:15 ` Pavel Machek
2007-08-28 1:24 ` 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=20070827064604.GD9809@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=jbms@cmu.edu \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@nigel.suspend2.net \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
--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