public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Power Management framework proposal
@ 2007-07-22  6:49 david
  2007-07-22  7:57 ` [linux-pm] " Igor Stoppa
  2007-07-22 17:26 ` Arjan van de Ven
  0 siblings, 2 replies; 40+ messages in thread
From: david @ 2007-07-22  6:49 UTC (permalink / raw)
  To: LKML, linux-pm

I'm deliberatly breaking the threading on this so that people who have 
tuned out the hibernation thread can take a look at this.

below is the proposal that I made at the bottom of one of the posts on the 
hibernation thread.

the idea is that instead of approaching power management from the point of 
view of the current desktop standard (ACPI), instead this approaches it 
from the point of view of 'what does a tool need to know to do the job' no 
matter what mechanism is actually used to implement the different modes.

one thing that I didn't put in the original post is that the framework 
that I mention below should work with other types of devices besides ACPI 
ones.

CPU clock settings could fit the same API for example (with modeID=0 being 
to hot-unplug the cpu and modeID=1 to initialize the cpu)

here's the original post:

in fact, a better abstraction would be something like

report_power_modes
    which would return a series of modes (sorted only by modeID)
    modeID, %power_used_in_this_mode, %capability_in_this_mode
    (I would make mode 0 always be complete power off, and mode 1 always be 
full capacity)

report_power_mode_speed
   which would return a matrix giving how long it takes to transition from any 
mode to any other mode. this should be a relative number, not an absolute 
number since it will be different at different clock speeds.

set_operational_mode(modeID)
   which would take you from whatever mode you are in now to the requested mode.

most devices would report the simple list of modes

0,0,0
1,100,100

with a mode_speed matrix of
    0 1
    ---
0|0 1
1|1 0

it may be that there is more info needed for the powr management engine to 
decide what modes it wants to put things into, if so identify what type of info 
you need and add another column to the modes list.
for example:
   you may want to add a flag for 'does this mode allow downstream devices to 
operate?'
   you may want to make a mode for 'this mode doesn't allow any new requests, 
but continues to process pending requests' and have a flag that indicates this

currently it looks like there's no way to find out what modes are available, 
and you have to know what mode something is in currently before you can request 
it change to a different mode. both of these prevent effective power management 
without encoding intimate knowledge of the capability of the particular 
hardware in your management tool.

some of this may be discoverable via the ACPI interface (it's not talked about 
much in the devices.txt file), but the mode setting is still wrong.

note that in the example above it's accpetable for a driver to cache what mode 
it thinks the device is in, but it needs to properly set the new mode even if 
it's cached data is incorrect.

this approach would allow the transition of ALL drivers to the new mode of 
operation in one fell swoop, and then adding additional power management 
features is just adding to the existing list rather then implementing new 
functions.

David Lang

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2007-07-30  1:50 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22  6:49 Power Management framework proposal david
2007-07-22  7:57 ` [linux-pm] " Igor Stoppa
2007-07-22  8:58   ` david
2007-07-22 12:05     ` Igor Stoppa
2007-07-22 21:21       ` david
2007-07-22 23:09         ` Arjan van de Ven
2007-07-23  2:45           ` david
2007-07-23  3:50             ` Arjan van de Ven
2007-07-23  4:04               ` david
2007-07-23  4:19                 ` Arjan van de Ven
2007-07-23  5:25                   ` david
2007-07-23 14:12                     ` Arjan van de Ven
2007-07-23 18:19                       ` david
2007-07-23  8:56                   ` Ondrej Zajicek
2007-07-23 17:33                     ` david
2007-07-27 12:04                     ` Pavel Machek
2007-07-23 10:48         ` Igor Stoppa
2007-07-23 18:14           ` david
2007-07-24  8:43             ` Jerome Glisse
2007-07-24 14:18               ` Igor Stoppa
2007-07-24 20:13                 ` david
2007-07-24 20:06               ` david
2007-07-24 23:14                 ` Jerome Glisse
2007-07-25  0:40                   ` david
2007-07-25 12:49                     ` Jerome Glisse
2007-07-29 21:56                       ` david
2007-07-22 17:26 ` Arjan van de Ven
2007-07-22 18:56   ` david
2007-07-22 22:27     ` Arjan van de Ven
2007-07-23  3:51       ` david
2007-07-23  4:00         ` Arjan van de Ven
2007-07-23  4:09           ` david
2007-07-27 11:46             ` Pavel Machek
2007-07-29 22:00               ` david
2007-07-30  1:05                 ` Matthew Garrett
2007-07-23 22:23   ` Benjamin Herrenschmidt
2007-07-24 20:14     ` david
2007-07-24 21:38       ` Benjamin Herrenschmidt
2007-07-24 23:02         ` david
2007-07-24 23:47           ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox