[linux-pm] [PATCH 01/13] PM: Add wake lock api.

Arve Hjønnevåg arve at android.com
Thu Feb 12 18:21:20 PST 2009

On Thu, Feb 12, 2009 at 5:10 PM, Matthew Garrett <mjg59 at srcf.ucam.org> wrote:
> I dislike the kernel-side use of wakelocks. They're basically equivalent
> to a device returning -EBUSY during the suspend phase, which is
> something that can be done without any kernel modifications.

I don't get why people object to wakelocks supporting timeouts, but
think drivers returning -EBUSY to abort suspend is ok. If suspend
fails, the higher level code has to periodically retry until it can
succeed. This means that the device is awake for longer than it need
to, and you are repeatedly wasting time freezing all tasks and
suspending a set of drivers before you get to the driver that is
preventing suspend.

Arve Hjønnevåg

More information about the linux-pm mailing list