Re: System sleep vs. runtime PM

Oliver Neukum
2009-12-03T17:13:25Z

Am Donnerstag, 3. Dezember 2009 16:25:30 schrieb Alan Stern:
> On Thu, 3 Dec 2009, Oliver Neukum wrote:

> > > There's yet another issue to discuss. Suppose a device is
> > > runtime-suspended when a system sleep starts. When the system wakes
> > > up, should the device be runtime-resumed? (Assume that the wakeup
> > > settings don't differ; otherwise it has to be.)
> >
> > That depends on how sure we are to never drop a remote wakeup,
> > not even if requests race or for any other reason. And we must always
> > know what woke us up.
>
> This is a complicated question and I will discuss it at greater length
> in another email.
>
> However, I don't see any reason to know what woke us up. All we really
> need to know is what devices have wakeup requests outstanding when the
> system resume is finished. It doesn't matter which request came first
> (presumably that was the one which woke us up).

That assumes that the firmware doesn't do anything stupid with
pending remote wakeups as it resumes the system. I'd call this
unwarranted optimism. The conservative solution would be to resume
every device whose driver has requested remote wakeup be enabled.

Regards
Oliver