Re: [RFC][PATCH 00/11] Android PM extensions

Pavel Machek
2009-01-29T13:04:24Z

On Thu 2009-01-15 10:08:51, Alan Stern wrote:
> 6~On Wed, 14 Jan 2009, Arve Hj?nnev?g wrote:
>
> > On Wed, Jan 14, 2009 at 1:01 AM, Nigel Cunningham
> > <ncunningham@crca.org.au> wrote:
> > > Would you be able to provide some more documentation?
> >
> > Would something like this help:
> > Documentation/power/wakelocks.txt
> >
> > Wakelocks
> > =========
> >
> > A wake_lock prevents the system from entering suspend or other low power
> > states when active. If the type is set to WAKE_LOCK_SUSPEND, the wake_lock
> > prevents a full system suspend. If the type is WAKE_LOCK_IDLE, low power
> > states that cause large interrupt latencies or that disable a set of
> > interrupts will not entered from idle until the wake_locks are released.
>
> Apart from the grammatical errors in this document and the
> over-engineering it describes, the writeup is terribly ambiguous.
> What do you mean by "prevents a full system suspend"? Does it mean
> that attempts to suspend the system will fail? Or will they just
> block until all these locks are released?

AFAICT, this is something very different. It is attempt to do
autosuspend right. Imagine burning cd... right now you can suspend,
and it will just stop the burn.

Wakelocks code allows you to tell the machine 'feel free to suspend
when you have nothing to do'... so the machine will burn the cd and
then suspend.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html