On Wed, 4 Aug 2010, Matthew Garrett wrote: > On Wed, Aug 04, 2010 at 10:42:08PM +0200, Pavel Machek wrote: > >> This came like a bit of a shock to me ("why do they make it so complex >> then"), but... it also means that as soon as you are able to stop >> "unwanted" processing, you can just leave normal cpuidle mechanisms to >> deal with the rest... > > How do you differentiate between "unwanted" and "wanted" processing in > the same task in a race-free manner? how much do you care? (not from a theoretical point of view, but from a practical point of view, how much difference does it make) how much "unwanted" processing would you allow a process to do before shutting down? how likely are apps that you would trust to just assert "I know better than the system or the user how important I am, don't you dare sleep now" that do this properly, but then do other processing that you really don't want to have happen? (I expect that if the authors of those apps ever ran into this case, they would just add another wakelock to prevent it) If the only things you have running are apps that are trusted to take the wakelock, are you really going to sleep any more frequently with the wakelock infrastructure than you would with just idle detection? (this can be tested today by just stubbing out the wakelock checks so they have no effect on sleeping) David Lang _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm