< Back to index
Suspend2 is an implementation of the suspend-to-disk or hibernate feature which is available as patches for the 2.6 Linux kernel. It was formerly known as 'swsusp'. During the 2.5 kernel era, Pavel Machek forked swsusp and got it merged into the vanilla kernel, while development continued in the swsusp/Suspend2 line. It includes support for SMP, highmem and preemption. Its major advantages over swsusp are:
* it has an extensible architecture that allows for arbitrary transformations on the image and arbitrary backends for writing the image;
* it prepares the image and allocates storage prior to doing any storage and accounts for memory and storage usage very carefully, thereby becoming more reliable;
* its current modules for writing the image have been designed for speed, combining asynchronous I/O and readahead with LZF compression in its default configuration to read and write the image as fast as hardware is able;
* it has an active community supporting it via a wiki, mailing lists and irc channel (see the Suspend2 website);
* it is more flexible and configurable (via a /sys/power/suspend2 interface);
* whereas the current swsusp (and uswsusp) implementations support writing the image to one swap device only, Suspend2 supports multiple devices in any combination of swap files and swap partitions. It can also write the image to an ordinary file, thereby avoiding potential race issues in freeing memory when preparing to suspend.
* it supports encryption by various methods;
* it can store a full image of memory (resulting in a more responsive system post-resume), while uswsusp and swsusp write at most half the amount of RAM.
Suspend2 is called 'Suspend2' because after the beta releases (at the time when Pavel forked the code base), there was a 1.0 release and then a 2.0 release. The name 'Suspend2' developed as a contraction of 'Software Suspend 2.x'.
Some efforts have been made over time to merge Suspend2 into the vanilla kernel, but these have been opposed by Pavel, primarily (it seems) because Pavel believes much of the suspend-to-disk process can and should be run from userspace, while Nigel thinks this code belongs in the kernel. At the present, Nigel is busy with other tasks and is not focussing on getting the code merged.
This entry uses material from from Wikipedia, the leading user-contributed encyclopedia. It is licensed under the GNU Free Documentation License. Disclaimer.