Skip to contentSkip to conversation

PowerOP, Intro 0/3

DISCUSSION Eugeny S. Mints 7 participants 14 messages Aug 24, 2006 – Oct 5, 2006

lore
Share & tools
lore
#0 lore raw

The PowerOP Core provides completely arch independent interface to create and control operating points which consist of arbitrary subset of power parameters available on a certain platform.

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string (parameter name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

PowerOP get and register point APIs use name/value pairs for the power parameters which eliminate the need for data structure sharing between
the PM core and consumers of the PowerOP API. Earlier versions
required include/asm-xxx/power_params.h to be included in both places.

This also enables a variable argument list for the registration and get APIs. Some operating points may only need to work with a subset of the power parameters. In this case the creator of the operating point only needs to provide the name/value pair for the parameters required for that point. The rest are set to a don't care value by the internals.

PowerOP is a building block for power management on systems that have a large set of power parameter that can adjusted to maximize power and
operational efficiency. Mobile consumer devices are examples of these
systems that require the PowerOP features. However, PowerOP works
just as well on systems with one or two parameters. The API allows the h/w layer to define what parameters are available on that platform.

Operating points can be registered at anytime. Registration can occur from a architecture init-call, loadable kernel module or some other layer. Operating point registration notifiers are provided for layers, such as cpufreq, that could take advantage of new operating points that become available or just need to know when operating points are loaded.

PowerOP continues to support in kernel governer concepts from cpufreq as well as userspace policy managers.

#1 lore raw

Hi!

Quoted 4 lines

The PowerOP Core provides completely arch independent interface to create and control operating points which consist of arbitrary subset of power parameters available on a certain platform.

Quoted 9 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string (parameter name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

I do not think this can work in notebook world, sorry. You'll just get way too many operating points.

Workable solution would be to create power domains, and group devices into power domains.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 16 lines · Pavel Machek

Hi!

Quoted 4 lines

The PowerOP Core provides completely arch independent interface to create and control operating points which consist of arbitrary subset of power parameters available on a certain platform.

Quoted 9 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string (parameter name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

Quoted 2 lines

I do not think this can work in notebook world, sorry. You'll just get way too many operating points.

The only feature for notebook world currently presented in the kernel is CPUFreq. CPUFreq PowerOP integration series I sent out for discussion is intended to at least provide the same functionality for notebook world as current functionality is. Did you glance at this series?

</personal> Pavel,
please stop removing original recipients from either TO: or CC: lists! please, when you snip original message _do_not_ snip names of replied persons! </end>
Eugeny

Quoted 3 lines

Workable solution would be to create power domains, and group devices into power domains.
Pavel

#3 lore raw

Hi!

Quoted 16 lines
Quoted 16 lines
Quoted 15 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point
represened by a string and arbitrary substet of power paremeters available on a
certain platform by a string (parameter name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated
this a point (point is passed by name or NULL to get current parameter values
from hw)

Quoted 5 lines
Quoted 3 lines

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

The only feature for notebook world currently presented in the kernel is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq, selective powerdown of devices (/sys/**/power/state), and suspend-to-ram/disk (not sure if it applies to you, but at least some powerop versions wanted to replace that).

Quoted 3 lines

series I sent out for discussion is intended to at least provide the same functionality for notebook world as current functionality is. Did you glance at this series?

Yes.

Quoted 6 lines

</personal> Pavel,
please stop removing original recipients from either TO:
or CC: lists!
please, when you snip original message _do_not_ snip names of replied persons!
</end>

Do you have example where I did that?
Pavel

Signature · 1 line
Thanks for all the (sleeping) penguins.
#4 lore raw

Pavel,

2006/8/26, Pavel Machek <[email protected]>:

Quoted 21 lines

Hi!

Quoted 19 lines
Quoted 19 lines
Quoted 7 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point
represened by a string and arbitrary substet of power paremeters available on a
certain platform by a string (parameter name) and

Quoted 8 lines

value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated
this a point (point is passed by name or NULL to get current parameter values
from hw)

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

Quoted 7 lines
Quoted 2 lines

The only feature for notebook world currently presented in the kernel is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq, selective powerdown of devices (/sys/**/power/state), and suspend-to-ram/disk (not sure if it applies to you, but at least some powerop versions wanted to replace that).

integration with legacy PM kernel code is the next step for PowerOP. There is no chance to address all in one step. We need to go step by step.

Quoted 6 lines
Quoted 3 lines

series I sent out for discussion is intended to at least provide the same functionality for notebook world as current functionality is. Did you glance at this series?

Yes.

Quoted 8 lines
Quoted 6 lines

</personal> Pavel,
please stop removing original recipients from either TO:
or CC: lists!
please, when you snip original message _do_not_ snip names of replied persons!
</end>

Do you have example where I did that?

This thread is example of both: original letter in this thread has 3 recepients while in your first reply there is noone.
And there is no a name of reply originator between your 'Hi' and '>>>>' signes while for example I have '2006/8/26, Pavel Machek <[email protected]>' in this reply.

Thanks,
Eugeny

Quoted 5 lines

Pavel

--
Thanks for all the (sleeping) penguins.

#5 lore raw
Quoted 8 lines · Eugeny S. Mints

2006/8/26, Pavel Machek <[email protected]>:

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

The only feature for notebook world currently presented in the kernel is CPUFreq. CPUFreq PowerOP integration

Quoted 7 lines
Quoted 4 lines

Actually no. In the notebook world, we do cpufreq, selective powerdown of devices (/sys/**/power/state), and suspend-to-ram/disk (not sure if it applies to you, but at least some powerop versions wanted to replace that).

integration with legacy PM kernel code is the next step for PowerOP. There is no chance to address all in one step. We need to go step by step.

Ok, but I guess I can't review it unless you do all the steps, and it seems to me you are going into the wrong direction now.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

</personal> Pavel,
please stop removing original recipients from either TO:
or CC: lists!
please, when you snip original message _do_not_ snip names of replied persons!
</end>

Quoted 6 lines
Quoted 1 line

Do you have example where I did that?

This thread is example of both: original letter in this thread has 3 recepients while in your first reply there is noone.
And there is no a name of reply originator between your 'Hi' and '>>>>' signes while for example I have '2006/8/26, Pavel Machek <[email protected]>' in this reply.

Ok, so you care about attribution lines. I'll try to keep them.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#6 lore raw
In reply to Pavel Machek
Quoted 21 lines · Pavel Machek

Hi!

Quoted 19 lines
Quoted 19 lines
Quoted 7 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an idenificator of the point
represened by a string and arbitrary substet of power paremeters available on a
certain platform by a string (parameter name) and

Quoted 8 lines

value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated
this a point (point is passed by name or NULL to get current parameter values
from hw)

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

Quoted 7 lines
Quoted 2 lines

The only feature for notebook world currently presented in the kernel is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq, selective powerdown of devices (/sys/**/power/state), and suspend-to-ram/disk (not sure if it applies to you, but at least some powerop versions wanted to replace that).

The main point is that you won't get too many operating points. You will get the number of operating points the x86 port of PowerOP chooses to have. In the cpufreq/PowerOP integration patches you get the same
number of operating points you have today in cpufreq. We query ACPI
for the list or use the hardcoded table. Also, if we provide a userspace API for creating operating points, distro's can create additional operating points that make sense for some specific use cases they would like to optimize around.

Matt

#7 lore raw

Hi, Matt,

Can you (and David, if his thoughts are different) clarify for me the scope of the "arbitrary subset of power parameters" managed by PowerOP?

I had visualized this as managing CPU speed, voltage, and some associated clock and bus speeds and voltages, as opposed to "devices", though there would be some interaction with devices indirectly through dependencies on specific speeds and voltages. I put "devices" in quotes because it's a somewhat ambiguous - it covers both things that you would normally think of as devices (like disk drives) and things that are modeled by device drivers but are actually just part of the system infrastructure (like the power management IC).

Put another way, I had been thinking of PowerOP as managing system-level power control, but that device-level controls would still be layered on that. Pavel's comments suggest that he thinks it would be managing devices as well (thereby creating a state explosion).

What model did you have in mind?

Thanks,
scott

Quoted 60 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Matthew Locke
Sent: Monday, August 28, 2006 2:38 AM
To: Pavel Machek
Cc: pm list
Subject: Re: [linux-pm] PowerOP, Intro 0/3

Quoted 5 lines · Pavel Machek

Hi!

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an

idenificator of the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string

(parameter

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

The only feature for notebook world currently presented in

the kernel

Quoted 3 lines
Quoted 1 line

is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq,

selective powerdown

Quoted 1 line

of devices (/sys/**/power/state), and suspend-to-ram/disk

(not sure if

Quoted 2 lines

it applies to you, but at least some powerop versions wanted to replace that).

The main point is that you won't get too many operating points. You will get the number of operating points the x86 port of PowerOP chooses to have. In the cpufreq/PowerOP integration patches you get the same
number of operating points you have today in cpufreq. We query ACPI
for the list or use the hardcoded table. Also, if we provide a userspace API for creating operating points, distro's can create additional operating points that make sense for some specific use cases they would like to optimize around.

Matt

_______________________________________________
linux-pm mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/linux-pm

#8 lore raw

Scott, Pavel,

Quoted 4 lines · Preece Scott-PREECE

Hi, Matt,

Can you (and David, if his thoughts are different) clarify for me the scope of the "arbitrary subset of power parameters" managed by PowerOP?

Scott does a pretty good job of clarifying, so my comments are below.

Quoted 11 lines

I had visualized this as managing CPU speed, voltage, and some associated clock and bus speeds and voltages, as opposed to "devices", though there would be some interaction with devices indirectly through dependencies on specific speeds and voltages. I put "devices" in quotes because it's a somewhat ambiguous - it covers both things that you would
normally think of as devices (like disk drives) and things that are modeled by device drivers but are actually just part of the system infrastructure (like the power management IC).

Quoted 8 lines

Put another way, I had been thinking of PowerOP as managing system-level
power control, but that device-level controls would still be layered on that. Pavel's comments suggest that he thinks it would be managing devices as well (thereby creating a state explosion).

What model did you have in mind?

Basically, PowerOP is a building block for managing system-level power control as you describe. Its for controlling bus, clocks, and voltages that affect the entire system. Devices are not controlled directly by
PowerOP. Device state should be managed by the devices themselves and
some other higher level software. The connection between devices and powerop is not device state control; it is notification and constraints.

PowerOP does not automatically lead to an explosion of states/points. As you can see from the cpufreq patches, PowerOP provides the same number points currently available in cpufreq. It gives the kernel developer and/or system designer the choice how to define the operating points.

Quoted 64 lines

Thanks,
scott

Quoted 60 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Matthew Locke
Sent: Monday, August 28, 2006 2:38 AM
To: Pavel Machek
Cc: pm list
Subject: Re: [linux-pm] PowerOP, Intro 0/3

Quoted 5 lines · Pavel Machek

Hi!

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an

idenificator of the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string

(parameter

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

The only feature for notebook world currently presented in

the kernel

Quoted 3 lines
Quoted 1 line

is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq,

selective powerdown

Quoted 1 line

of devices (/sys/**/power/state), and suspend-to-ram/disk

(not sure if

Quoted 2 lines

it applies to you, but at least some powerop versions wanted to replace that).

The main point is that you won't get too many operating points. You will get the number of operating points the x86 port of PowerOP chooses to have. In the cpufreq/PowerOP integration patches you get the same
number of operating points you have today in cpufreq. We query ACPI
for the list or use the hardcoded table. Also, if we provide a userspace API for creating operating points, distro's can create additional operating points that make sense for some specific use cases they would like to optimize around.

Matt

_______________________________________________
linux-pm mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/linux-pm

#9 lore raw
Quoted 32 lines · Matthew Locke

Scott, Pavel,

Quoted 4 lines · Preece Scott-PREECE

Hi, Matt,

Can you (and David, if his thoughts are different) clarify for me the scope of the "arbitrary subset of power parameters" managed by PowerOP?

Scott does a pretty good job of clarifying, so my comments are below.

Quoted 11 lines

I had visualized this as managing CPU speed, voltage, and some associated clock and bus speeds and voltages, as opposed to "devices", though there would be some interaction with devices indirectly through dependencies on specific speeds and voltages. I put "devices" in quotes because it's a somewhat ambiguous - it covers both things that you would
normally think of as devices (like disk drives) and things that are modeled by device drivers but are actually just part of the system infrastructure (like the power management IC).

Quoted 8 lines

Put another way, I had been thinking of PowerOP as managing system-level
power control, but that device-level controls would still be layered on that. Pavel's comments suggest that he thinks it would be managing devices as well (thereby creating a state explosion).

What model did you have in mind?

Quoted 7 lines

Basically, PowerOP is a building block for managing system-level power control as you describe. Its for controlling bus, clocks, and voltages that affect the entire system. Devices are not controlled directly by
PowerOP. Device state should be managed by the devices themselves and
some other higher level software. The connection between devices and powerop is not device state control; it is notification and constraints.

Matt has it exactly right.

Quoted 6 lines

PowerOP does not automatically lead to an explosion of states/points. As you can see from the cpufreq patches, PowerOP provides the same number points currently available in cpufreq. It gives the kernel developer and/or system designer the choice how to define the operating points.

The possible combinations of system state and device state should be managed by the power daemon. The kernel should just provide the services to put the system and devices into their supported states. Policies about combination to create and when to use them is the power managers relm.

The difference between the designs is that the operating point definition is defined at compile time in OpPoint greatly simplifying the code.

The power manager just manages system state by operating point name and controls devices through the standard sysfs device interface.

David

Quoted 71 lines
Quoted 65 lines

Thanks,
scott

Quoted 60 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Matthew Locke
Sent: Monday, August 28, 2006 2:38 AM
To: Pavel Machek
Cc: pm list
Subject: Re: [linux-pm] PowerOP, Intro 0/3

Quoted 5 lines · Pavel Machek

Hi!

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PowerOP Core upper layer interface provides the following capabilities:
- to register an operating point by passing an

idenificator of the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

point represened by a string and arbitrary substet of power paremeters available on a certain platform by a string

(parameter

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

name) and value pairs.
- to unregister operating point by name
- to set operating point by name
- to get values of arbitrary subset of platform power parameters associated this a point (point is passed by name or NULL to get current parameter values from hw)

I do not think this can work in notebook world, sorry. You'll just get
way too many operating points.

The only feature for notebook world currently presented in

the kernel

Quoted 3 lines
Quoted 1 line

is CPUFreq. CPUFreq PowerOP integration

Actually no. In the notebook world, we do cpufreq,

selective powerdown

Quoted 1 line

of devices (/sys/**/power/state), and suspend-to-ram/disk

(not sure if

Quoted 2 lines

it applies to you, but at least some powerop versions wanted to replace that).

The main point is that you won't get too many operating points. You will get the number of operating points the x86 port of PowerOP chooses to have. In the cpufreq/PowerOP integration patches you get the same
number of operating points you have today in cpufreq. We query ACPI
for the list or use the hardcoded table. Also, if we provide a userspace API for creating operating points, distro's can create additional operating points that make sense for some specific use cases they would like to optimize around.

Matt

_______________________________________________
linux-pm mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/linux-pm

_______________________________________________
linux-pm mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/linux-pm

#10 lore raw
In reply to Matthew Locke

Matthew,

Nitpicking, I know, but:

Quoted 3 lines · Matthew Locke

PowerOP does not automatically lead to an explosion of states/points. As you can see from the cpufreq patches, PowerOP provides the same number points currently available in cpufreq.

- Also the ~64.000 points[*] currently available in gx-suspmod.c ?
- Also the intervals + "mode" currently available in and for longrun.c ?

Thanks,
Dominik

[*] rough calculation. Might be significantly lower, but it's definitely in
the 1E5 area.

#11 lore raw
In reply to Pavel Machek

Hi Pavel,

Quoted 2 lines

Workable solution would be to create power domains, and group devices into power domains.

what do you mean by power domain here? Is a power domain a set of arbitrary chosen devices?
Do you think "operating point" operating with power domains and not devices directly is an acceptable solution for your laptop? :)

Vitaly

#12 lore raw

Hi!

Quoted 5 lines
Quoted 2 lines

Workable solution would be to create power domains, and group devices into power domains.

what do you mean by power domain here? Is a power domain a set of arbitrary chosen devices?

Basically, yes. Set of devices, where power/frequency transitions need to be coordinated between them.

Quoted 2 lines

Do you think "operating point" operating with power domains and not devices directly is an acceptable solution for your laptop? :)

I guess it would be more like many different powerops for independend pieces of hardware. And yes, that should work.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#13 lore raw

Hello Pavel,

Quoted 8 lines · Pavel Machek

Hi!

Quoted 5 lines
Quoted 2 lines

Workable solution would be to create power domains, and group devices into power domains.

what do you mean by power domain here? Is a power domain a set of arbitrary chosen devices?

Quoted 8 lines

Basically, yes. Set of devices, where power/frequency transitions need to be coordinated between them.

Quoted 2 lines

Do you think "operating point" operating with power domains and not devices directly is an acceptable solution for your laptop? :)

I guess it would be more like many different powerops for independend pieces of hardware. And yes, that should work.

okay, this is just another layer of indirection which can be added later. Why not reach a consensus here that PowerOP is basically fine, probably needing to have power domain concept added (though there might be some disagreement, I guess) and, consequently, start integrating PowerOP into the mainline?

Vitaly