public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Nigel Cunningham <ncunningham@crca.org.au>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org,
	Kexec Mailing List <kexec@lists.infradead.org>
Subject: Re: [PATCH -mm] kexec jump -v9
Date: Wed, 12 Mar 2008 14:53:56 -0400	[thread overview]
Message-ID: <20080312185356.GD13549@redhat.com> (raw)
In-Reply-To: <1205288074.29875.22.camel@caritas-dev.intel.com>

On Wed, Mar 12, 2008 at 10:14:34AM +0800, Huang, Ying wrote:
> On Wed, 2008-03-12 at 08:59 +1100, Nigel Cunningham wrote:
> > Hi all.
> > 
> > I hope kexec turns out to be a good, usable solution. Unfortunately,
> > however, I still have some areas where I'm not convinced that kexec is
> > going to work or work well:
> > 
> > 1. Reliability.
> > 
> > It's being sold as a replacement for freezing processes, yet AFAICS it's
> > still going to require the freezer in order to be reliable. In the
> > normal case, there isn't much of an issue with freeing memory or
> > allocating swap, and so these steps can be expected to progress without
> > pain. Imagine, however, the situation where another process or processes
> > are trying to allocate large amounts of memory at the same time, or the
> > system is swapping heavily. Although such situations will not be common,
> > they are entirely conceivable, and any implementation ought to be able
> > to handle such a situation efficiently. If the freezer is removed, any
> > hibernation implementation - not just kexec - is going to have a much
> > harder job of being reliable in all circumstances. AFAICS, the only way
> > a kexec based solution is going to be able to get around this will be to
> > not have to allocate memory, but that will require permanent allocation
> > of memory for the kexec kernel and it's work area as well as the
> > permanent, exclusive allocation of storage for the kexec hibernation
> > implementation that's currently in place (making the LCA complaint about
> > not being able to hibernate to swap on NTFS on fuse equally relevant).
> 
> As Eric said kexec need only to allocate memory during loading, not
> executing.

Yes. But this memory gets reserved at loading time and then this memory
remains unused for the whole duration (except hibernation).

In the example you gave, looks like you are reserving 15MB of memory for
second kernel. In practice, we we finding it difficult to boot a regular
kernel in 16MB of memory in kdump. We are now reserving 128MB of memory
for kdump kernel on x86 arch, otheriwse OOM kill kicks in during init
or while core is being copied.

Kexec based hibernation does not look any different than kdump in terms
of memory requirements. The only difference seems to be that kdump does
the contiguous memory reservation at boot time and kexec based hibernation
does the memory reservation at kernel loading time.

The only difference I can think of is, kdump will generally run on servers
and hibernation will be required on desktops/laptops and run time memory
requirements might be little different. I don't have numbers though.

At the same time carrying a separate kernel binary just for hibernation
purposes does not sound very good.
  
[..]
> > 3. Usability.
> > 
> > Right now, kexec based hibernation looks quite complicated to configure,
> > and the user is apparently going to have to remember to boot a different
> > kernel or at least a different bootloader entry in order to resume. Not
> 
> No, the newest implementation need not to boot a different kernel or
> different bootloader entry. You just use one bootloader entry, it will
> resume if there's an image, booting normally if there's not. You can
> look at the newest hibernation example description.
> 

Following is the step from new method you have given.

7. Boot kernel compiled in step 1 (kernel C). Use the rootfs.gz as
   root file system.

This mentions that use rootfs.gz as initrd. Without modifying the boot
loader entry, how would I switch the initrd dynamically.

Looks like it might be a typo. So basically we can just boot back into
normal kernel and then a user can load the resumable core file and kexec
to it?

I think all this functionality can be packed into normal initrd itself
to make user interface better.

A user can configure the destination for hibernated image at system
installation time and initrd will be modified accordingly to save the
hibernated image as well to check that user specfied location to find out
if a hibernation image is available and needs to be resumed.

Thanks
Vivek

  reply	other threads:[~2008-03-12 18:55 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06  3:13 [PATCH -mm] kexec jump -v9 Huang, Ying
2008-03-11 21:10 ` Vivek Goyal
2008-03-11 21:59   ` Nigel Cunningham
2008-03-11 23:55     ` Eric W. Biederman
2008-03-12  0:09     ` david
2008-03-12  2:14     ` Huang, Ying
2008-03-12 18:53       ` Vivek Goyal [this message]
2008-03-13  0:01         ` Eric W. Biederman
2008-03-11 22:18   ` Rafael J. Wysocki
2008-03-12  2:02     ` Eric W. Biederman
2008-03-12  2:26     ` Huang, Ying
2008-03-11 23:24   ` Pavel Machek
2008-03-11 23:49     ` Rafael J. Wysocki
2008-03-12  1:55       ` Huang, Ying
2008-03-12 15:01         ` [linux-pm] " Alan Stern
2008-03-12 21:53           ` Rafael J. Wysocki
2008-03-13  0:33             ` Eric W. Biederman
2008-03-13 17:03               ` Rafael J. Wysocki
2008-03-13 23:07                 ` Eric W. Biederman
2008-03-14  1:31                   ` Rafael J. Wysocki
     [not found]                     ` <m1prtsug2e.fsf@ebiederm.dsl.xmission.com>
2008-03-18 23:52                       ` Pavel Machek
2008-03-19  0:08                       ` Rafael J. Wysocki
2008-03-19  2:33                         ` Alan Stern
     [not found]                           ` <m1ve3jtmxk.fsf@ebiederm.dsl.xmission.com>
2008-03-19 15:01                             ` Alan Stern
2008-03-19 19:28                               ` Rafael J. Wysocki
2008-03-20 10:40                             ` Pavel Machek
2008-03-20 22:45                               ` Rafael J. Wysocki
2008-03-20 23:01                                 ` Alan Stern
2008-03-20 23:22                                   ` Pavel Machek
2008-03-20 23:40                                     ` Rafael J. Wysocki
2008-03-21  0:36                                       ` Rafael J. Wysocki
2008-03-21  0:52                                       ` Alan Stern
2008-03-21 22:05                                         ` Nigel Cunningham
2008-03-22 16:21                                         ` Pavel Machek
2008-03-22 17:45                                           ` Rafael J. Wysocki
2008-03-22 20:49                                             ` Alan Stern
2008-03-22 21:29                                               ` Rafael J. Wysocki
2008-05-14 22:38                                                 ` Eric W. Biederman
2008-05-14 23:47                                                   ` Rafael J. Wysocki
2008-05-15 20:55                                                     ` Eric W. Biederman
2008-05-15 21:20                                                       ` Rafael J. Wysocki
2008-05-14 20:41                       ` Maxim Levitsky
2008-05-14 23:34                         ` Eric W. Biederman
2008-03-12  8:57       ` Pavel Machek
2008-03-12  0:00     ` Nigel Cunningham
2008-03-12  1:45   ` Huang, Ying
2008-03-12  2:17     ` Eric W. Biederman
2008-03-12  6:54       ` Huang, Ying
2008-03-12 19:37       ` Vivek Goyal
2008-03-14  8:03         ` Huang, Ying
2008-03-21 19:12           ` Vivek Goyal
2008-03-25  7:25             ` Huang, Ying
2008-03-12 19:47     ` Vivek Goyal
2008-04-09  9:34 ` Pavel Machek
2008-04-09 12:30   ` Vivek Goyal
2008-05-14 16:03 ` Vivek Goyal
2008-05-14 17:49   ` Vivek Goyal
2008-05-14 20:52 ` Vivek Goyal
2008-05-15  2:32   ` Huang, Ying
2008-05-15 20:09     ` Vivek Goyal
2008-05-16  1:48       ` Huang, Ying
2008-05-16  1:51         ` Vivek Goyal
2008-05-16  2:08           ` Huang, Ying
2008-05-16 12:13         ` Pavel Machek
2008-05-15  5:41   ` Huang, Ying
2008-05-15 18:42     ` Eric W. Biederman
2008-05-16  0:51     ` Vivek Goyal
2008-05-16  1:35       ` Eric W. Biederman
2008-05-16  1:55         ` Huang, Ying
2008-05-27  7:27       ` Huang, Ying
2008-05-27 22:15         ` Vivek Goyal
2008-05-28  1:35           ` Huang, Ying
2008-05-14 22:30 ` Eric W. Biederman
2008-05-14 23:55   ` Rafael J. Wysocki
2008-05-15 22:03     ` Eric W. Biederman
2008-05-15 23:20       ` Rafael J. Wysocki
2008-05-16 12:18       ` Pavel Machek
2008-05-16 14:20       ` [linux-pm] " Alan Stern
2008-05-15  1:42   ` Huang, Ying
2008-05-15 19:05     ` Rafael J. Wysocki
2008-05-15 14:14   ` [linux-pm] " Alan Stern
2008-05-15 20:48     ` Eric W. Biederman
2008-05-15 21:07       ` Alan Stern

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=20080312185356.GD13549@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=ncunningham@crca.org.au \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --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