Suspend to Disk/RAM
Posted Jul 22, 2005 20:44 UTC (Fri) by
zblaxell (subscriber, #26385)
In reply to:
Suspend to Disk/RAM by danm628
Parent article:
The 2005 Linux Kernel Developers' Summit
If you have working suspend-to-RAM, suspend-to-disk, and ACPI wakeup (echo YYYY-MM-DD HH:MM:SS > /proc/acpi/alarm), it is possible to have the machine arrange to wake itself up in 15 minutes, then suspend to RAM. On resume from RAM, the machine checks the clock and decides to either finish resuming, or suspend to disk. I know this works because I've configured my ex-laptop to do it...but I stopped because the laptop was more often than not in a moving insulated laptop case 15 minutes after suspend, and the CPU would sometimes cook itself in the ~45 seconds required to suspend to disk, especially in summer.
I'd like to see an LVM with a snapshot feature combined with suspend-to-disk, to implement a checkpoint-restart system, with the option of reverting the entire system (RAM and disk) to where it was when it last suspended. The relatively minor data loss of reverting to last suspend before a crash is usually much less painful than reconstructing all the userspace state by hand (literally).
Once the suspend/resume problem is solved, the next most annoying thing about laptops is the game of Russian roulette that is played every time a PCMCIA or USB device is connected. It's especially bad for laptops since they are exposed to more devices per boot than a typical desktop in my experience. If a device with a buggy Linux driver crashes on load, it usually takes the system with it. A checkpoint/restart approach would allow the user to say "oops, guess I'll unplug that and try again" instead of "darn, now I have to spend 20 minutes getting all my user-space stuff put back together."
(
Log in to post comments)