Power Management
Richard Hughes
hughsient at gmail.com
Fri Jun 8 11:49:16 EDT 2007
On Fri, 2007-06-08 at 11:42 -0400, Chris Ball wrote:
> 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
Which we can get from the system load, or is there a better geode
specific way of doing this?
> * if the video on the screen isn't changing
How can we get this from userspace?
> * if we aren't dealing with any keypresses/input from the user
We can monitor input devices...
> * if the currently running activity hasn't told sugar/OHM to inhibit
> sleeping while it's running
Like when?
> * if there isn't a software tick (dynticks/tickless) planned for the
> very near future
Can we get this info from the kernel?
> * .. then we can go to sleep. :)
Finally! :-)
> > 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.
That's some pretty sweet hardware.
> 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.
Surely you don't want to suspend during a system update or software
installation... We can even use the HAL lock interface to do this.
Richard.
More information about the Devel
mailing list