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

Pavel Machek
2009-02-04T13:29:35Z

> > For example, if one process tries to start an auto-suspend, and at the
> > same time another process writes "mem" to /sys/power/state? Then the
> > second process should take precedence and the system should go into
> > suspend. When it wakes up again, the first process would still be
> > waiting for an auto-suspend to occur. I suppose the details don't
> > matter much because it's not likely to crop up often.
>
> I'll make a change to make any write to /sys/power/state disable
> wakelocks. I'll probably also add a config option to remove
> /sys/power/state.
>
> Before I post another patch series I have a few questions:
> - Should I merge the wakelock and early-suspend api patches with their
> implementations? (I initially implemented the api on top of the old
> android_power driver, but we not longer use this)

I think so.

> - Once wakelocks are disabled by writing to /sys/power/state, is there
> any demand for re-enabling wakelock support?

I do not think wakelocks should be disabled. They should probably be
ignored for echo mem > state, but disabling them sounds wrong.

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