Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-24 Thread Rafael J. Wysocki
On Tuesday, 24 July 2007 16:00, Huang, Ying wrote: > >From: Rafael J. Wysocki [mailto:[EMAIL PROTECTED] > >This is not the point. There are memory regions that you should not > _restore_, > >because that will cause harm. > > > >> On x86_64, there is another usage of nosave during processing E820 >

RE: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-24 Thread Huang, Ying
>From: Rafael J. Wysocki [mailto:[EMAIL PROTECTED] >This is not the point. There are memory regions that you should not _restore_, >because that will cause harm. > >> On x86_64, there is another usage of nosave during processing E820 >> memory map. But I don't know why the memory region other than

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread david
On Tue, 17 Jul 2007, Rafael J. Wysocki wrote: On Tuesday, 17 July 2007 14:48, Huang, Ying wrote: On Tue, 2007-07-17 at 01:13 -0700, [EMAIL PROTECTED] wrote: however, since the resume designed for ACPI won't work would the following approach work 1. boot one kernel 2. setup a kexec the same wa

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread Rafael J. Wysocki
On Tuesday, 17 July 2007 14:48, Huang, Ying wrote: > On Tue, 2007-07-17 at 01:13 -0700, [EMAIL PROTECTED] wrote: > > however, since the resume designed for ACPI won't work would the following > > approach work > > > > 1. boot one kernel > > 2. setup a kexec the same way you would for hibernate >

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread Huang, Ying
On Tue, 2007-07-17 at 01:13 -0700, [EMAIL PROTECTED] wrote: > however, since the resume designed for ACPI won't work would the following > approach work > > 1. boot one kernel > 2. setup a kexec the same way you would for hibernate > 3. kexec to the new kernel > 4. overwrite the memory of the fir

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread Rafael J. Wysocki
On Tuesday, 17 July 2007 10:13, [EMAIL PROTECTED] wrote: > Ying, as the kexec guru in this thread I have a question for you about how > kexec works (and possibly where you are going with this) > > for the power-off hibernate with ACPI disabled the hibernation seems > fairly straightforward (alth

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread Rafael J. Wysocki
On Tuesday, 17 July 2007 06:18, [EMAIL PROTECTED] wrote: > On Mon, 16 Jul 2007, Rafael J. Wysocki wrote: > > > On Monday, 16 July 2007 16:42, Huang, Ying wrote: > >> On Mon, 2007-07-16 at 14:17 +0200, Rafael J. Wysocki wrote: > is this a matter of running some test to find out, or is this a

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-17 Thread david
Ying, as the kexec guru in this thread I have a question for you about how kexec works (and possibly where you are going with this) for the power-off hibernate with ACPI disabled the hibernation seems fairly straightforward (although there are still some missing pieces) however, since the res

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-16 Thread david
On Mon, 16 Jul 2007, Rafael J. Wysocki wrote: On Monday, 16 July 2007 16:42, Huang, Ying wrote: On Mon, 2007-07-16 at 14:17 +0200, Rafael J. Wysocki wrote: is this a matter of running some test to find out, or is this a question for the kexec implemantors? Actually, I'd like someone to tell

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-16 Thread Rafael J. Wysocki
On Monday, 16 July 2007 16:42, Huang, Ying wrote: > On Mon, 2007-07-16 at 14:17 +0200, Rafael J. Wysocki wrote: > > > is this a matter of running some test to find out, or is this a question > > > for the kexec implemantors? > > > > Actually, I'd like someone to tell me. ;-) > > > > I've browse

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-16 Thread Huang, Ying
On Mon, 2007-07-16 at 14:17 +0200, Rafael J. Wysocki wrote: > > is this a matter of running some test to find out, or is this a question > > for the kexec implemantors? > > Actually, I'd like someone to tell me. ;-) > > I've browsed the kexec code, but haven't found anything related to the devi

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-16 Thread Rafael J. Wysocki
On Monday, 16 July 2007 01:22, [EMAIL PROTECTED] wrote: > On Mon, 16 Jul 2007, Rafael J. Wysocki wrote: > > > On Sunday, 15 July 2007 21:23, [EMAIL PROTECTED] wrote: > >> On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: > >> > >> I think this is far more complicated then it needs to be. > >>

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread david
On Mon, 16 Jul 2007, Rafael J. Wysocki wrote: On Sunday, 15 July 2007 21:33, [EMAIL PROTECTED] wrote: On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 23:34, [EMAIL PROTECTED] wrote: On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 09:51, [EMAI

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread david
On Mon, 16 Jul 2007, Rafael J. Wysocki wrote: On Sunday, 15 July 2007 21:23, [EMAIL PROTECTED] wrote: On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: I think this is far more complicated then it needs to be. it sounds like it should be possible to do the following 1. figure out what pages sho

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Rafael J. Wysocki
On Sunday, 15 July 2007 21:33, [EMAIL PROTECTED] wrote: > On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: > > > On Saturday, 14 July 2007 23:34, [EMAIL PROTECTED] wrote: > >> On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: > >> > >>> On Saturday, 14 July 2007 09:51, [EMAIL PROTECTED] wrote: > On

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Rafael J. Wysocki
On Sunday, 15 July 2007 21:23, [EMAIL PROTECTED] wrote: > On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: > > I think this is far more complicated then it needs to be. > > it sounds like it should be possible to do the following > > 1. figure out what pages should be backed

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread david
On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 23:34, [EMAIL PROTECTED] wrote: On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 09:51, [EMAIL PROTECTED] wrote: On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: Ok, now we need a data channel from

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread david
On Sun, 15 Jul 2007, Rafael J. Wysocki wrote: I think this is far more complicated then it needs to be. it sounds like it should be possible to do the following 1. figure out what pages should be backed up (creating a data structure to hold them) That should be done after step 2, because the

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Rafael J. Wysocki
On Sunday, 15 July 2007 11:30, Huang, Ying wrote: > On Sat, 2007-07-14 at 21:16 +0200, Rafael J. Wysocki wrote: > > > The devices should be quiesced and the state of devices should be saved > > > in kexec_jump, before relocate_kernel is called. This needs the > > > implementation of device hibernat

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 23:34, [EMAIL PROTECTED] wrote: > On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: > > > On Saturday, 14 July 2007 09:51, [EMAIL PROTECTED] wrote: > >> On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > >> > Ok, now we need a data channel from the old kernel to the hiberna

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 23:13, [EMAIL PROTECTED] wrote: > On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: > > > On Saturday, 14 July 2007 22:34, [EMAIL PROTECTED] wrote: > >> in the past, Rafael J. Wysocki wrote: > >> > >>> BTW, please read this message and tell me what you think: > >>> > >>> http

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-15 Thread Huang, Ying
On Sat, 2007-07-14 at 21:16 +0200, Rafael J. Wysocki wrote: > > The devices should be quiesced and the state of devices should be saved > > in kexec_jump, before relocate_kernel is called. This needs the > > implementation of device hibernating as you mentioned before. > > Hmm, at which point devi

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 09:51, [EMAIL PROTECTED] wrote: On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: Ok, now we need a data channel from the old kernel to the hibernate kernel, to the restore kernel. and the messier the memory layout the larger

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
On Sat, 14 Jul 2007, Rafael J. Wysocki wrote: On Saturday, 14 July 2007 22:34, [EMAIL PROTECTED] wrote: in the past, Rafael J. Wysocki wrote: BTW, please read this message and tell me what you think: http://lkml.org/lkml/2007/7/13/265 Greetings, Rafael since I've deleted this message h

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 22:34, [EMAIL PROTECTED] wrote: > in the past, Rafael J. Wysocki wrote: > > > BTW, please read this message and tell me what you think: > > > > http://lkml.org/lkml/2007/7/13/265 > > > > Greetings, > > Rafael > > > > > > > > since I've deleted this message here's the rel

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
in the past, Rafael J. Wysocki wrote: BTW, please read this message and tell me what you think: http://lkml.org/lkml/2007/7/13/265 Greetings, Rafael since I've deleted this message here's the relavent portion of it Okay, I have thought it through and I think that, as an initial step, we

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 09:51, [EMAIL PROTECTED] wrote: > On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > > >> Ok, now we need a data channel from the old kernel to the hibernate > >> kernel, to the restore kernel. and the messier the memory layout the > >> larger this data channel needs to be (

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 12:55, Huang, Ying wrote: > On Sat, 2007-07-14 at 11:59 +0200, Rafael J. Wysocki wrote: > > > Hibernating process: > > > > > > 1. Normal kernel running > > > 2. Hibernating is triggered, sys_kexec_load is used to load > > > hibernating kernel and initramfs into m

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Huang, Ying
On Sat, 2007-07-14 at 11:59 +0200, Rafael J. Wysocki wrote: > > Hibernating process: > > > > 1. Normal kernel running > > 2. Hibernating is triggered, sys_kexec_load is used to load > > hibernating kernel and initramfs into memory. Then > > sys_reboot(LINUX_REBOOT_CMD_KSPAWN) is invo

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 07:48, Huang, Ying wrote: > On Fri, 2007-07-13 at 10:43 -0600, Eric W. Biederman wrote: > > > Why a assembly stub is necessary? Is it not sufficient that just > > > continue to complete a normal boot (hot add the reset of memory) or load > > > the hibernated kernel (hibern

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread Rafael J. Wysocki
On Saturday, 14 July 2007 10:33, [EMAIL PROTECTED] wrote: > by the way, a data point on kernel sizes > > -rw-r--r-- 1 root root 864648 Jul 14 00:53 vmlinuz.2.6.22.1.hibernate > -rw-r--r-- 1 root root 659496 Jul 14 01:17 > vmlinuz.2.6.22.1.hibernate.stripped > -rw-r--r-- 1 root root 3948168 Jul

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
by the way, a data point on kernel sizes -rw-r--r-- 1 root root 864648 Jul 14 00:53 vmlinuz.2.6.22.1.hibernate -rw-r--r-- 1 root root 659496 Jul 14 01:17 vmlinuz.2.6.22.1.hibernate.stripped -rw-r--r-- 1 root root 3948168 Jul 14 01:10 vmlinuz.2.6.22.1.running the running one matches the config

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: Ok, now we need a data channel from the old kernel to the hibernate kernel, to the restore kernel. and the messier the memory layout the larger this data channel needs to be (hmm, what's the status on the memory defrag patches being proposed?) if thi

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: remember release early, release often (with something that functions) fo rthe current stage where we are trying to make things work don't worry about packaging everything tight with initrd and re-useing partitions or kernel images. once everything

Re: [linux-pm] Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-14 Thread david
On Fri, 13 Jul 2007, Alan Stern wrote: On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: I missed this discussion. is this idea to suspend, write to disk, but leave things in ram so that if you wakeup soon enough you have everything for ram, but if you don't and the battery dies you can restore fr

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Al Boldi
Huang, Ying wrote: > > Hibernating process: > > 1. Normal kernel running > 2. Hibernating is triggered, sys_kexec_load is used to load > hibernating kernel and initramfs into memory. Then > sys_reboot(LINUX_REBOOT_CMD_KSPAWN) is invoked. > 3. In sys_reboot, kexec_jump is called to s

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Huang, Ying
On Fri, 2007-07-13 at 10:43 -0600, Eric W. Biederman wrote: > > Why a assembly stub is necessary? Is it not sufficient that just > > continue to complete a normal boot (hot add the reset of memory) or load > > the hibernated kernel (hibernated image) and jump to it? > > I was thinking the assembly

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 18:48, Jeremy Maitin-Shepard wrote: > "Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: > > [snip] > > > Okay, I have thought it through and I think that, as an initial step, we > > can do > > something like this: > > > - preload the image-saving kernel before hibernation

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 20:15, Alan Stern wrote: > On Fri, 13 Jul 2007, Eric W. Biederman wrote: > > > > I doubt that re-probing devices will work. The probe routine won't > > > expect there to be any registered children, so it will try to > > > re-register them. > > > > So really unregister t

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 17:50, Alan Stern wrote: > On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > > > Okay, I have thought it through and I think that, as an initial step, we > > can do > > something like this: > > > > - preload the image-saving kernel before hibernation > > - in the hibernatio

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Alan Stern
On Fri, 13 Jul 2007, Eric W. Biederman wrote: > > I doubt that re-probing devices will work. The probe routine won't > > expect there to be any registered children, so it will try to > > re-register them. > > So really unregister the children. All we really need to do is disassociate > the dr

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Eric W. Biederman
Alan Stern <[EMAIL PROTECTED]> writes: > On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > >> Okay, I have thought it through and I think that, as an initial step, we can > do >> something like this: >> >> - preload the image-saving kernel before hibernation >> - in the hibernation code path replac

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Jeremy Maitin-Shepard
"Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: [snip] > Okay, I have thought it through and I think that, as an initial step, we can > do > something like this: > - preload the image-saving kernel before hibernation > - in the hibernation code path replace device_suspend() with the shutting do

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Eric W. Biederman
"Huang, Ying" <[EMAIL PROTECTED]> writes: > On Thu, 2007-07-12 at 10:32 -0600, Eric W. Biederman wrote: >> > >> > 1. Separate device suspend from device hibernate. >> >> Actually in some very practical sense we already have two copies of >> this in the kernel. device_shutdown and the hotunplug/m

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Alan Stern
On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > Okay, I have thought it through and I think that, as an initial step, we can > do > something like this: > > - preload the image-saving kernel before hibernation > - in the hibernation code path replace device_suspend() with the shutting > down of

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 17:28, Al Boldi wrote: > Rafael J. Wysocki wrote: > > We have quite an efficient restoration code in the kernel right now. It's > > able to upload big images (something like total RAM minus the size of the > > boot kernel, initrd and, optionally, the resume application), wh

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 17:12, Jeremy Maitin-Shepard wrote: > "Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: > > [snip] > > > Not necessarily. If we don't put devices into low power states before > > creating > > the image, that should work just fine (quiesce devices, create the image or > > k

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Al Boldi
Rafael J. Wysocki wrote: > On Friday, 13 July 2007 19:32, Huang, Ying wrote: > > On Thu, 2007-07-12 at 20:06 -0700, [EMAIL PROTECTED] wrote: > > > >> I agree, a stipped down hibernate kernel can be very small, not > > > >> allocating this memory until it's needed is a step for the final > > > >> po

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Al Boldi
Rafael J. Wysocki wrote: > We have quite an efficient restoration code in the kernel right now. It's > able to upload big images (something like total RAM minus the size of the > boot kernel, initrd and, optionally, the resume application), which is > much more than we're able to save. :-) > > It

Re: [linux-pm] Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 16:37, Alan Stern wrote: > On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > > > > I missed this discussion. is this idea to suspend, write to disk, but > > > leave things in ram so that if you wakeup soon enough you have everything > > > for ram, but if you don't and the b

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Huang, Ying
On Thu, 2007-07-12 at 10:54 +0200, Pavel Machek wrote: > > Sorry, I should have re-checked the mail before sending out. > > Were your patches enough to get hibernation working? I got kexec to > work here, so I guess I'm one step closer... Yes, it is just the first step. There are still many steps

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Huang, Ying
On Thu, 2007-07-12 at 10:32 -0600, Eric W. Biederman wrote: > > > > 1. Separate device suspend from device hibernate. > > Actually in some very practical sense we already have two copies of > this in the kernel. device_shutdown and the hotunplug/module > remove code. So it is should be mostly a

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Jeremy Maitin-Shepard
"Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: [snip] > Not necessarily. If we don't put devices into low power states before > creating > the image, that should work just fine (quiesce devices, create the image or > kexec the new kernel, reprobe devices, save the image, suspend to RAM, > resu

Re: [linux-pm] Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Alan Stern
On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > > I missed this discussion. is this idea to suspend, write to disk, but > > leave things in ram so that if you wakeup soon enough you have everything > > for ram, but if you don't and the battery dies you can restore from disk? > > > > if so I thi

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 19:32, Huang, Ying wrote: > On Thu, 2007-07-12 at 20:06 -0700, [EMAIL PROTECTED] wrote: > > >> I agree, a stipped down hibernate kernel can be very small, not > > >> allocating > > >> this memory until it's needed is a step for the final polishing. > > > > > > I'm not sure

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 11:38, [EMAIL PROTECTED] wrote: > On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: > > > On Friday, 13 July 2007 05:06, [EMAIL PROTECTED] wrote: > >> On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > >> > >>> On Thursday, 12 July 2007 20:57, [EMAIL PROTECTED] wrote: > On Th

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
EMAIL PROTECTED]>, > > "Huang, Ying" <[EMAIL PROTECTED]>, > > Andrew Morton <[EMAIL PROTECTED]>, Pavel Machek <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED], linux-kernel@vger.kernel.org, > > [EMAIL PROTECTED] > > Subject: Re: [P

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread david
On Fri, 13 Jul 2007, Rafael J. Wysocki wrote: On Friday, 13 July 2007 05:06, [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: On Thursday, 12 July 2007 20:57, [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: 2. Do not reserve memory for kexec ker

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Huang, Ying
On Thu, 2007-07-12 at 20:06 -0700, [EMAIL PROTECTED] wrote: > >> I agree, a stipped down hibernate kernel can be very small, not allocating > >> this memory until it's needed is a step for the final polishing. > > > > I'm not sure if I agree with that. In any case, having to use two different > >

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread david
OTECTED]>, Pavel Machek <[EMAIL PROTECTED]>, [EMAIL PROTECTED], linux-kernel@vger.kernel.org, [EMAIL PROTECTED] Subject: Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation On Friday, 13 July 2007 05:12, [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, Jeremy Ma

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 05:06, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > > > On Thursday, 12 July 2007 20:57, [EMAIL PROTECTED] wrote: > >> On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > >> > 2. Do not reserve memory for kexec kernel. That is, backup needed m

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-13 Thread Rafael J. Wysocki
On Friday, 13 July 2007 05:12, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Jeremy Maitin-Shepard wrote: > > > "Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: > > > > [snip] > > > >> There's more to it, though. If devices are suspended, the hibernation > >> kernel > >> will have to resume the

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Jeremy Maitin-Shepard wrote: "Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: [snip] There's more to it, though. If devices are suspended, the hibernation kernel will have to resume them (using platform, like ACPI, callbacks in the process) instead and that will get compl

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: On Thursday, 12 July 2007 20:57, [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: 2. Do not reserve memory for kexec kernel. That is, backup needed memory before kexec and restore them after kexec. I don't think this is ver

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Mark Lord
Jeremy Maitin-Shepard wrote: A typical usage pattern of hibernate on a laptop is to shut the lid, causing the system to start to hibernate, and to place the machine in All laptops we have here, and those of all people I have seen with laptops, do suspend-to-RAM on lid-close, not hibernate. An

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Pavel Machek
Hi! > > Looks interesting... but I was feeling strange dejavu reading > > this... and that's because you pasted the changelog twice :-). > > > > Sorry, I should have re-checked the mail before sending out. Were your patches enough to get hibernation working? I got kexec to work here, so I guess

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 21:55, Jeremy Maitin-Shepard wrote: > "Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: > > [snip] > > > There's more to it, though. If devices are suspended, the hibernation > > kernel > > will have to resume them (using platform, like ACPI, callbacks in the > > proces

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Jeremy Maitin-Shepard
Mark Lord <[EMAIL PROTECTED]> writes: [snip] > Whoops.. wrong half of the script. > For TuxOnIce in 10 seconds, it does this: [snip] I'd argue that for most usage patterns, it doesn't matter all that much how long it takes to hibernate and power off the system. What really matter is that it is

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Jeremy Maitin-Shepard
"Rafael J. Wysocki" <[EMAIL PROTECTED]> writes: [snip] > There's more to it, though. If devices are suspended, the hibernation kernel > will have to resume them (using platform, like ACPI, callbacks in the process) > instead and that will get complicated. > It's better if devices are quiesced,

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Eric W. Biederman
[EMAIL PROTECTED] writes: > On Thu, 12 Jul 2007, Eric W. Biederman wrote: > >>> 2. Do not reserve memory for kexec kernel. That is, backup needed memory >>> before kexec and restore them after kexec. >>> 3. Support the in-place kexec? The relocatable kernel is not necessary >>> if this can be impl

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 21:14, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > > note that what devices get put to sleep could be configurable, > potentially > to the extreme of things like the OLPC (that have hardware designed for > cheap sleeping

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 20:57, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > > >>> I didn't understand the ACPI problem. Does this mean that CONFIG_ACPI > >>> must > >>> be disabled in the to-be-hibernated kernel, or in the little transient > >>> kexec kernel? > >>

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: note that what devices get put to sleep could be configurable, potentially to the extreme of things like the OLPC (that have hardware designed for cheap sleeping) going into a light suspend-to-ram state between keystrokes if nothing else has a timer

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Eric W. Biederman wrote: 2. Do not reserve memory for kexec kernel. That is, backup needed memory before kexec and restore them after kexec. 3. Support the in-place kexec? The relocatable kernel is not necessary if this can be implemented. It sounds like what you really wa

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 20:42, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: > > > On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: > >> On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: > >> > >>> Andrew Morton wrote: > On Wed, 11 Jul 2007 15:30:31 +

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: On Thursday, 12 July 2007 12:10, [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, Huang, Ying wrote: On Thu, 2007-07-12 at 00:03 -0700, [EMAIL PROTECTED] wrote: The kexec jump is the first step, maybe the simplest step. There are many other issues

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Mark Lord wrote: [EMAIL PROTECTED] wrote: actually, I think that while you may be able to get away with only one kernel, you are probably better off with two. on the hibernate kernel you can choose many 'embedded' options that don't make sense for the normal kernel (no

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: I didn't understand the ACPI problem. Does this mean that CONFIG_ACPI must be disabled in the to-be-hibernated kernel, or in the little transient kexec kernel? Under current implementation of device state quiescent/save/restore, the CONFIG_ACPI mu

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Mark Lord wrote: Rafael J. Wysocki wrote: On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: > On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: > > > Andrew Morton wrote: .. > 8. hibernate kernel does syspend-to-ram to put the devices into a known > safe state

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Rafael J. Wysocki wrote: On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: Andrew Morton wrote: On Wed, 11 Jul 2007 15:30:31 + "Huang, Ying" <[EMAIL PROTECTED]> wrote: 1. Boot a kernel A 2. Work under kern

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Eric W. Biederman
I like the concept, but I completely disagree with your current implementation. I think it will be much easier if you start with a completely independent code path and then just reuse the pieces of the existing code path that you need. More details below. "Huang, Ying" <[EMAIL PROTECTED]> wri

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Mark Lord
Mark Lord wrote: Rafael J. Wysocki wrote: .. How much RAM is there in your machine? 2GB, but It doesn't need to dump that much for good performance. Hibernate here consists of: echo "$(( 256 * 1024 * 1024 ))" > /sys/power/image_size echo -n disk > /sys/power/state Plus a couple of fiddly

Re: [linux-pm] Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Alan Stern
On Thu, 12 Jul 2007, Mark Lord wrote: > Rafael J. Wysocki wrote: > > On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: > >> On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: > >> > >>> Andrew Morton wrote: > .. > >> 8. hibernate kernel does syspend-to-ram to put the devices into a known > >

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Mark Lord
Rafael J. Wysocki wrote: On Thursday, 12 July 2007 15:51, Mark Lord wrote: .. Currently, TuxOnIce(suspend2) takes about 10 seconds to suspend my notebook. Switching to this new scheme would double that to 10 seconds to boot/probe, plus the original 10 seconds to hibernate. Assuming the new impl

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 15:51, Mark Lord wrote: > Rafael J. Wysocki wrote: > > On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: > >> On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: > >> > >>> Andrew Morton wrote: > .. > >> 8. hibernate kernel does syspend-to-ram to put the devices into a

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Pavel Machek
Hi! > And the complexity and difficulty of setup really scares > me. > Right now, we've got a pretty good/fast in-kernel (well, > external patch) > that allows my machines to hibernate very quickly, wake > up even faster, > and not swap like mad afterwards. Without any external > programs, >

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Pavel Machek
Hi! > >Maybe my usage of terminology has some problem. But, > >the "device > >hibernate" here means put device into quiescent state > >and save the > >device state, but do not put device into low power > >state. > > is there really enough savings (in time or otherwise) to > make it worth spli

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Mark Lord
[EMAIL PROTECTED] wrote: actually, I think that while you may be able to get away with only one kernel, you are probably better off with two. on the hibernate kernel you can choose many 'embedded' options that don't make sense for the normal kernel (no high mem, no SMP support, no SELinux, no

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Mark Lord
Rafael J. Wysocki wrote: On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: Andrew Morton wrote: .. 8. hibernate kernel does syspend-to-ram to put the devices into a known safe state. Again, the devices should be quiesced rather then su

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread jimmy bahuleyan
Rafael J. Wysocki wrote: [snip] > > So if a user wants to install a kernel.org kernel on his system, (s)he'll have > to compile and install two kernels with different options. > > That doesn't sound good to me. :-) > definitely. that sounds kind of strange, not to think of having to remember wh

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 12:10, [EMAIL PROTECTED] wrote: > On Thu, 12 Jul 2007, Huang, Ying wrote: > > > On Thu, 2007-07-12 at 00:03 -0700, [EMAIL PROTECTED] wrote: > >>> > >>> The kexec jump is the first step, maybe the simplest step. There are > >>> many other issues to be resolved, at least th

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 16:43, Huang, Ying wrote: > On Wed, 2007-07-11 at 17:22 -0700, Andrew Morton wrote: > > This sounds awesome. Am I correct in expecting that ultimately the > > existing hibernation implementation just goes away and we reuse (and hence > > strengthen) the existing kexec (an

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 19:09, Huang, Ying wrote: > On Wed, 2007-07-11 at 22:48 -0700, Jeremy Fitzhardinge wrote: > > >> The kexec jump is implemented in the framework of software suspend. In > > >> fact, the kexec based hibernation can be seen as just implementing the > > >> image writing and re

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 08:43, [EMAIL PROTECTED] wrote: > On Wed, 11 Jul 2007, Jeremy Fitzhardinge wrote: > > > Andrew Morton wrote: > >> On Wed, 11 Jul 2007 15:30:31 + > >> "Huang, Ying" <[EMAIL PROTECTED]> wrote: > >> > >> > 1. Boot a kernel A > >> > 2. Work under kernel A > >> > 3.

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Rafael J. Wysocki
On Thursday, 12 July 2007 02:22, Andrew Morton wrote: > On Wed, 11 Jul 2007 15:30:31 + > "Huang, Ying" <[EMAIL PROTECTED]> wrote: > > > Kexec base hibernation has some potential advantages over uswsusp and > > suspend2. Some most obvious advantages are: > > > > 1. The hibernation image size c

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Huang, Ying wrote: On Thu, 2007-07-12 at 00:03 -0700, [EMAIL PROTECTED] wrote: The kexec jump is the first step, maybe the simplest step. There are many other issues to be resolved, at least the following ones. 1. Separate device suspend from device hibernate. Maybe m

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Huang, Ying
On Thu, 2007-07-12 at 00:03 -0700, [EMAIL PROTECTED] wrote: > > > > The kexec jump is the first step, maybe the simplest step. There are > > many other issues to be resolved, at least the following ones. > > > > 1. Separate device suspend from device hibernate. > Maybe my usage of terminology has

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Huang, Ying
On Wed, 2007-07-11 at 22:48 -0700, Jeremy Fitzhardinge wrote: > >> The kexec jump is implemented in the framework of software suspend. In > >> fact, the kexec based hibernation can be seen as just implementing the > >> image writing and reading method of software suspend with a kexeced > >> Linux k

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread Huang, Ying
On Wed, 2007-07-11 at 13:13 +0200, Pavel Machek wrote: > Hi! > > Looks interesting... but I was feeling strange dejavu reading > this... and that's because you pasted the changelog twice :-). > Sorry, I should have re-checked the mail before sending out. > How fast can kexec boot secondary kern

Re: [PATCH 0/2] Kexec jump: The first step to kexec base hibernation

2007-07-12 Thread david
On Thu, 12 Jul 2007, Huang, Ying wrote: On Wed, 2007-07-11 at 17:22 -0700, Andrew Morton wrote: This sounds awesome. Am I correct in expecting that ultimately the existing hibernation implementation just goes away and we reuse (and hence strengthen) the existing kexec (and kdump?) infrastructu

  1   2   >