Power Management

Power optimization for PC Architecture is vastly different from that for embedded systems such as ARM based PDAs or Cell phones. This is because each embedded chipset has its own unique set of power management features that require a custom flavor of linux built from the ground up. PC based chipsets already have a well established code base in linux, with existing hardware interfaces such as ACPI and HAL; and as they have evolved from desktops into smaller, more portable systems, a wealth of software packages have been created to optimize power. Each of these packages can be thought of as a power micro-policy controller for a specific subsystem on a linux based platform. For instance cpufreq manages power for the CPU supsystem, or the iwconfig interface manages device specific power for the Network (WLAN) subsystem. Currently all these micro-policy managers function independantly of one another and with little or no information from the user domain. Thus there are two things lacking in linux with regard to power. The first is a centralized policy manager which can gather input from ACPI, the user, and running applications to generate a complete picture of how the device is being used. This information can be used to create macro-policies which can selectively tune or override the systems micro-policy managers to achieve far greater power optimization. The second piece missing is a scheme to create micro-policy managers for all power-hungry subsystems that dont currently support any form of control.

Architecture usage model

Micro-policy focus is on the subsystem and driver level

Architecture

The power policy manager for linux is meant to be a universal, cross-platform framework for reducing power consumption in linux based devices; with particular focus on handhelds. It is implemented in three parts: a configuration data layer, a micro policy engine control layer, and a daemon that ties the two together.

Constraints

Leverage established linux protocols and interfaces wherever possible

Configuration Input Layer

Configuration Element Interface (CEI)

The CEI will be implemented as a simple DBUS function call using the glib-dbus; wrappers. With this strategy, an xml file is created which describes the function:

<node name="/PPM">
			<interface name="com.intel.cei">
				<method name="SendConfigurationElement">
					<arg type="s" name="config_element" direction="in" />
					<arg type="s" name="target" direction="in" />
					<arg type="s" name="svalue" direction="in" />
					<arg type="i" name="ivalue" direction="in" />
				</method>
			</interface>
		</node>

Using the dbus-binding-tool provided by glib we can then create a server and client header file that enables the usage of this function. The function will look like this:

gboolean send_config_element(DBusGProxy *proxy, char *element, char *target, char *svalue, int ivalue);

The PPM Daemon will act as the server and the single receiver of the function call, and any number of applications or a GUI can act as clients by sending elements out through this function. The ppmd server is called through the DBUS server connection, and therefore must have the proper configuration files in place for the DBUS daemon to allow it to run.

Configuration Element List

These data points represent very specific conditions which may affect power or performance. Some can be used immediately for obvious purposes, but some are just there as placeholders for some future benefit. The user will likely never provide this information manually at this level. Usage model data at this granularity will be provided by the system (ACPI, HAL, Applications, or the GUI in the form of a macro). Each type of input can be broken down into a set of specific "configuration elements" which are what is actually sent across DBUS.

User Focus

These refer to how the user will interact with the MID. These represent the only things that the user MUST tell us.

Table 2.1. Energy Focus

Config Element(string) Target(string) Value(string) Value(int)
videofocus lcdmon,extmon,exttv none,rare,intermittent,often,constant X ms (reaction time needed)
audiofocus speakers,headphones,ext none,rare,intermittent,often,constant X ms (reaction time needed)
userinput keypad,mouse,touchscr,camera none,rare,intermittent,often,constant X ms (reaction time needed)
tgtbattlife all 1hour,2hour,4hour,8hour,max X minutes til off

Device Position

These refer to the physical position and state of the MID. They are things that for the most part the user will have to enter, but we can work to make most of these automatically detected