User: Password:
|
|
Subscribe / Log in / New account

Wakelocks

Wakelocks

Posted Dec 23, 2011 0:08 UTC (Fri) by neilbrown (subscriber, #359)
In reply to: Wakelocks by brendan_wright
Parent article: Bringing Android closer to the mainline

Certainly the OS needs to know when it can suspend quickly and userspace apps need to provide that information.

But the "kernel" doesn't need to be particularly involved in this. User-space apps can talk to user-space suspend manager and when an appropriate time to suspend arrives the user-space suspend manager can initiate a suspend.

wakelocks as a feature are perfectly fine. However they don't need to be a kernel feature.

(well .. to be accurate there does need to be a way for kernel modules such as drivers to hold-off suspend for a while, but we have that - they are called wakeup-sources. Userspace uses a separate mechanism that is more fitting for user-space).

(and to be completely fair - there is a school of thought which says that we shouldn't be using suspend at all and so wakelocks aren't fine no matter where they are implemented. Adherents of this school believe that when a tab isn't visible the animation on it should stop and then when nothing is using CPU the CPU should reduce power usage. It is hard to argue against this in terms of elegance of the design. Whether it is practical is somewhat easier to argue against).


(Log in to post comments)

Wakelocks

Posted Dec 23, 2011 11:15 UTC (Fri) by brendan_wright (guest, #7376) [Link]

> Certainly the OS needs to know when it can suspend quickly and userspace apps need to provide that information.

> But the "kernel" doesn't need to be particularly involved in this.

I'm not fussed about how it works, just as long as we're not still arguing about either the need for them, or the implementation details, in two years time! :-/


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds