Power Management

Chris Ball cjb at laptop.org
Fri Jun 8 11:42:41 EDT 2007


Hi,

   > Is there a mechanism for either applications or users to change the
   > parameters? And what constitutes "idle"?

A first shot at what constitues "idle" is if all of the below are true:

   * if the CPU isn't under load
   * if the video on the screen isn't changing
   * if we aren't dealing with any keypresses/input from the user
   * if the currently running activity hasn't told sugar/OHM to inhibit
     sleeping while it's running
   * if there isn't a software tick (dynticks/tickless) planned for the
     very near future
   * .. then we can go to sleep.  :)

   > In particular, I'm thinking about the book reader. If you're
   > sitting around under a tree reading, and you're not a particularly
   > fast reader or you get distracted, it could get really annoying to
   > have the display keep turning off.

Agreed.

   > Similarly, turn-based games over the mesh might have you waiting
   > while your opponent moves, and you might not be sitting there
   > tapping the keyboard while waiting.

This should be fine -- when your opponent's move's network traffic hits
the Marvell chip, it will assert a wakeup and the CPU'll come back and
process the traffic.

I'm actually having trouble thinking of a case where we want to inhibit
suspend that isn't already inhibited by the heuristic above.  Can anyone
else?  Richard mentioned "don't suspend during a system update", but
if our system update tool breaks the system when we run out of battery
in the middle of an update, we have bigger problems.  The tool should
operate atomically if it can.

- Chris.
-- 
Chris Ball   <cjb at laptop.org>



More information about the Devel mailing list