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

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

 



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.

Well, for example disk driver certainly needs interrupt controller and
timer devices to be working... Disk itself does not care about timer
devices, but driver certainly needs them.

And it is this kind of dependencies that would make it "interesting".

> > 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.

Yes, that's what everyone wants to do.

> 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.

Eh? If you have Save after Stop, how are you going to allocate memory
for save?

I'd try not to overcomplicate it. Current sequence seems to work quite
okay. It only got interesting for ipw2100. 

								Pavel

-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


[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