Re: pmdisk suspend patch

Benjamin Herrenschmidt
2004-03-15T06:40:46Z

On Mon, 2004-03-15 at 02:19, Giridhar Pemmasani wrote:
> Hello
>
> I have been trying to get a reliable way to suspend-to-disk. For me
> swsusp was taking more than a few minutes and swsusp2 was not
> reliable. So I decided to give pmdisk a chance. Since my laptop
> supported S4bios, pmdisk wouldn't let me change it to S4 platform
> based suspend. Even after fixing it, I didn't have much luck. I dug
> deeper and found another problem. pmdisk resumes all devices while
> suspending. So I patched the pmdisk to resume only the device on which
> suspend image is to be stored. With these patches, I have been able to
> use pmdisk reliably (tested with two laptops over 100 times).
>
> I am not subscribed to the mailing list, so if you have problems or
> feedback, CC to me.

That's broken. You cannot call resume_device for a single device
like that. You must properly (and in order) resume the parents of
this device first. Your patch, on some controllers, will cause the
IDE layer to try to wake up the drive without waking up the IDE
controller itself.

I agree that it would be nice to be able to resume only one "branch"
of the PM tree like that, it's just not possible at this point.

Ben