FreeBSD disk hibernation - Was: Resuming from a crashdump

From: João Carlos Mendes Luís (jonny_at_jonny.eng.br)
Date: 01/25/05

  • Next message: João Carlos Mendes Luís: "Re: FreeBSD disk hibernation - Was: Resuming from a crashdump"
    Date: Tue, 25 Jan 2005 00:21:05 -0200
    To: hackers@freebsd.org
    
    

    Ryan Sommers wrote:
    > João Carlos Mendes Luís wrote:
    >
    >> Isn't it much easier to simply reload the full memory dump
    >> (hibernation file, not dump device) into RAM and continue from that
    >> point? This should be done by /boot/loader, not by a full kernel, as
    >> the memory dump will also contain the kernel.
    >>
    >> At this point, all you have to do is to restore the hardware state,
    >> which may (or may not) be just the same as recovering from suspend state.
    >
    >
    > Restoring the hardware state requires restoring the state inside each
    > and every hardware device. For certain devices this is trivial. However,
    > I believe for devices with much more complex internal state machines
    > this is way beyond the scope of the loader.

         This is not to be done by the loader. Loader will only load the
    file into memory. It's this "running image" that will restore hardware
    state.

    > Now, that isn't to say the loader couldn't start executing the kernel
    > somewhere other than "the beginning" and instead at a point where the
    > kernel would specifically know it was awoken from hibernation and
    > cleanup/reinitialize any devices.

         Almost this. Just note that we are not dealing with a kernel
    anymore. If we have, someday, a swapable kernel, parts of it may be in
    the swap, and not in core.

    > My little knowledge on this subject aside. I'd love to have full
    > suspend/resume functionality. It'd make my life as a mobile freebsd user
    > much much easier. However, I wouldn't want it at the expense of every
    > kernel. It would need to be something completely modular.

         It will require every driver used to be able to restore hardware
    state, and this may impact every kernel a bit. Other than this, it
    should be modular.

         BTW: This is not useful only for laptops. Some desktops could
    benefit from this also. I like to hibernate windows XP desktops just to
    continue processing from the same point on the next day, and do not
    waste energy doing this. Maybe even some servers (mostly processing
    servers, not network servers) could use this capability to survive
    energy blackouts, hibernating when the UPS goes on battery for some time.

         I've thought on this before windows XP come with an implementation,
    but I don't have enough knowledge to even start the hardware device
    state setup. :-(

                                             Jonny

    -- 
    João Carlos Mendes Luís - Networking Engineer - jonny@jonny.eng.br
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: João Carlos Mendes Luís: "Re: FreeBSD disk hibernation - Was: Resuming from a crashdump"

    Relevant Pages

    • [PATCH 0/3 -mm] kexec based hibernation -v6
      ... khibernation - kexec based hibernation ... Linux kernel 2.6.24-rc2-mm1, and has been tested on IBM T42 with ACPI ... A simplest memory image restoring tool named "krestore" is ...
      (Linux-Kernel)
    • Re: Hibernation considerations
      ... This part could easily be handled by the normal kernel before and after ... getting the USB subsystem to restore devices following a hibernate. ... saving the hibernation image will add ... Does that include the time required for probing PCI buses? ...
      (Linux-Kernel)
    • RE: [linux-pm] [RFC][PATCH 0/2 -mm] kexec based hibernation
      ... I think the kexec based hibernation may be slower than original ... The hibernation image size can exceed half of memory size easily. ... the kernel code needed is ...
      (Linux-Kernel)
    • [PATCH 0/4 -mm] kexec based hibernation -v7
      ... khibernation - kexec based hibernation ... Linux kernel 2.6.24-rc4-mm1, and has been tested on IBM T42 with ACPI ... A simplest memory image restoring tool named "krestore" is ...
      (Linux-Kernel)
    • Re: [linux-pm] Re: [RFC][PATCH 1/2 -mm] kexec based hibernation -v3: kexec jump
      ... Kexec will itself be an implementation, ... up with people screaming about no hibernation support. ... the complete removal of the existing hibernation code from the kernel. ... Not to be callous but that really is a user space and distro issue. ...
      (Linux-Kernel)