Re: Suspend2 - Request for review & inclusion in -mm

Nigel Cunningham
2006-06-27T23:37:23Z

[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]

Hi.

On Tuesday 27 June 2006 23:33, Pavel Machek wrote:
> Hi!
>
> > I'd like, at long last, to submit Suspend2 for review and inclusion in
> > -mm.
> >
> > All going well, I'll shortly be sending a number of sets of patches,
> > which together represent the whole of suspend2 as it stands at the
> > moment. Those of you who've looked at Suspend2 code before will see that
> > there are far fewer changes outside of kernel/power than there have been
> > in the past. In some cases, this is because we were early adopters of
> > some functionality that has now been merged, and in others because
> > better, less intrusive ways have been found of doing some things.
> >
> > Some of the advantages of suspend2 over swsusp and uswsusp are:
> >
> > - Speed (Asynchronous I/O and readahead for synchronous I/O)
>
> uswsusp should be able to match suspend2's speed. It can do async I/O,
> etc...
>
> > - Well tested in a wide range of configurations
> > - Supports multiple swap partitions and files
>
> Doable in userspace with uswsusp.

Doable != done.

> > - Supports writing to ordinary files and raw devices.
>
> Should be doable in userspace with uswsusp, too; I actually had raw
> devices version at one point.
>
> > - Userspace helpers for user interface and storage management.
>
> Better put it completely in userspace :-).
>
> > - Support for cancelling the suspend at any point while the image is
> > being written (can be disabled)
>
> uswsusp does that... or did that at some point.
>
> > - Can be configured and reconfigured without rebooting.
>
> No problem for uswsusp.
>
> > - Scripting support
>
> What does that mean?

At boot time, having done anything you need to do to set up access to the
image storage, you can:

cat /proc/suspend2/image_exists

The result shows 0 if no image exists, or 1 and a couple of extra lines of
detail from the header if an image does exist (or -1 if there's no
recognisable signature).

You can also echo 0 > /proc/suspend2/image_exists to invalidate an image.

Regards,

Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]