Re: New Software Suspend Patch for testing.

Patrick Mochel (mochel@osdl.org)
Tue, 15 Apr 2003 13:06:07 -0700 (PDT)


> Brief howto:
> (Assuming you've applied the patch against 2.5.66 - other versions may
> work too).
> 1. Patch, compile as normal.
> 2. Ensure your kernel commandline includes resume=/dev/hdaX where X is a
> swap partition you will be using. More than one swap partition can be
> used. This just specifies which will have its header used to indicate
> that the system is suspended and where to find the data.
> 3. If you want debugging info: echo 1 20 15 31 > /proc/sys/kernel/swsusp
> (See line 201ff of kernel/suspend.c for what the numbers mean).
> 4. echo 4 > /proc/acpi/sleep to start the process.
> The system should save the image and powerdown.
> If you choose the debugging info, you'll have to press SHIFT at the end
> of each step.
> If you press SHIFT at other times, you can toggle this pausing on and
> off.
> Whether you selected the debugging info or not, you can press ALT to
> cancel the process.
> 5. To resume, reboot with the same kernel. The image should be detected
> and reloaded without you needing to do anything special. Pausing or not
> is state-persistent from when you suspended.
> 6. You should (DV) get your system back to where it was when you started
> the process.

I have a (fairly large) request:

Would you mind updating Documentation/swsusp.txt (and moving it to
Documentation/power/swsusp.txt)?

This will accomplish a few things:

- Make the documentation readable.

- Explain exactly how swsusp works internally.

- Explain how to use it.

- Explain what the current dependencies and bugs are.

- Explain what the cryptic debug values above are.

Frankly, the code is a mess and difficult to follow. It's also poorly
commented. I spent the time about a month ago unwinding and deciphering
it. Unfortunately, my work conflicts heavily with the work that you're
doing, and the lack of documentation describing the intent of the code
makes it difficult to make sane judgements of it.

Thanks,

-pat

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/