On Fri, 28 May 2010 16:59:54 +0200 Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote: > So lets look at the problem, we want to be frugal with power, this means > that the system as a whole should strive to do nothing. And we want to > enforce this as strict as possible. An interesting thought might be to add the costs of staying in a state versus going to a lower power state into consideration. If the system is busy doing stuff it would need to do anyway (today stuff that is guarded/annotated by the suspend blockers) , the costs for not being in suspend have to be paid anyway. So it is opportune for processes to run. Even if they by themselves would not justify the system running. If instead nothing system-relevant has to be done, the costs of running anything non-relevant is the full amount of battery-life that could be saved by suspending + (some minor) running costs. Also if there is much work to do (many tasks) its more likely that it's good to do the work. something along the lines : (amount of energy saved by being in suspend) / (number of tasks we would run if we werent suspended) * some_parameter_for_this_tasks_importance (which falls clearly into scheduler-territory) And if this goes above some threshold we run it. But this isn't easily done in a robust way. Also it complicates things. Cheers, Flo _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm