swsusp & modules [was Re: [linux-pm] [Fwd: Re: PM messages]]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Oct 2004, Pavel Machek wrote:

> Hi!
>
> > Actually the point I've been meaning to chime in on here is
> > that since, as Benjamin noted, if there's a "write to storage"
> > step (STD, not STR) it uses the "quiesced"/"frozen" system
> > state ... then the real problem is just that the current
> > framework **resumes way too many devices** when writing that
> > out to swap.  (Which is a fourth step...)
>
> It unfreezes all devices. And that's right thing to do, because
> otherwise you'd need to be able to tell dependencies between devices.
>
> Imagine suspending to usb flashdisk... (Perhaps I'm paranoid and do
> not want my passwords on magnetic media).

The dependency is a device path. As long as we know what device we're
suspending to, we can re-enable all of its ancestors, then the target
device itself, then write the image.

> Ouch and if you powerdown vga in "freeze" phase, user sees no progress and
> debugging swsusp is now impossible.

That's actually another reason why it'd be good to differentiate between
'stopping' a device and 'powering it down'. We can temporarily freeze the
video device, save it's state, then re-enable it to continue writing to
the screen. Ditto for the swap device.

Hrm. Maybe we should do:

	- Stop
	- Save
	- Restart

On each device as we walk the tree. That way we would never have to worry
about the swap device being stopped before we allocated memory for all
devices. We would also have the ability to separate that action from
actually powering the device down, too.


	Pat


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux