Hi, This most probably needs some more work, but I think it's sufficient for a preview. The following series of patches creates a user space interface for swsusp that makes it possible to move the image-writing and reading functionality of swsusp to the user space. The interface is based on a special character device allowing a user space process to initiate suspend or resume using ioctls and to write or read the system memory snapshot from the device (actually more operations are defined on the device). The device itself is introduced by the second patch. The first patch adds some low-level snapshot-handling functions. The overall idea is that the in-kernel swap-handling code of swsusp and the userland interface code should use the same set of low-level functions operating on the system memory snapshot. The last two patches are auxiliary. The third one moves the in-kernel swap-writing and reading code to a separate file, called swap.c, and the last patch moves the highmem-handling code to swsusp.c. The patches apply on top of the three swsusp-related patches I posted earlier today. In case you'd like to run some tests, the entire series applicable on top of 2.6.15-rc5-mm3 is available at: http://www.sisk.pl/kernel/patches/2.6.15-rc5-mm3/ (the other patches in the series are either bugfixes or debug patches, and the order is given by the "series" file). Also available are very simple demo userland utilities using the interface: http://www.sisk.pl/kernel/utilities/suspend/ that are also attached to this message. The "suspend" utility is designed to work from the (root) shell, but the "resume" utility should be invoked from an initrd (I just point /linuxrc to it and start the kernel with the "noresume" command line parameter to prevent the in-kernel resume code from reading the image). The utilities are intentionally 100% compatible with the in-kernel swap-writing and reading code (ie. the image created by "suspend" can be restored by the in-kernel code etc.). Any feedback will be very much appreciated. Greetings, Rafael -- Beer is proof that God loves us and wants us to be happy - Benjamin Franklin