PM QoS: add a per-device latency constraints class
Subsystems (21)
PATCH v4 15/15 OMAP2+: cpuidle only influences the MPU state
In reply to [email protected]From: Jean Pihet <[email protected]>
Since cpuidle is a CPU centric framework it decides the MPU next power state based on the MPU exit_latency and target_residency figures.
The rest of the power domains get their next power state programmed from the devices PM QoS framework, via the devices wake-up latency constraints.
Note: the exit_latency and target_residency figures of the MPU include the MPU itself and the peripherals needed for the MPU to execute instructions (e.g. main memory, caches, IRQ controller, MMU etc). Some of those peripherals can belong to other power domains than the MPU subsystem and so the corresponding latencies must be included in this figure.
Tested on OMAP3 Beagleboard in RET/OFF using wake-up latency constraints on MPU, CORE and PER.
--- arch/arm/mach-omap2/cpuidle34xx.c | 42 +++++++++++------------------------- arch/arm/mach-omap2/pm.h | 17 +++++++++++++- 2 files changed, 28 insertions(+), 31 deletions(-)
arch/arm/mach-omap2/cpuidle34xx.c +13 -29
@@ -37,26 +37,26 @@#ifdef CONFIG_CPU_IDLE /* -* The latencies/thresholds for various C states have +* The MPU latencies/thresholds for various C states have * to be configured from the respective board files. * These are some default values (which might not provide * the best power savings) used on boards which do not * pass these details from the board file. */ static struct cpuidle_params cpuidle_params_table[] = { -/* C1 */ +/* C1 . MPU WFI + Core active */ {2 +2 ,5 ,1 }, -/* C2 */ +/* C2 . MPU WFI + Core inactive */ {10 +10 ,30 ,1 }, -/* C3 */ +/* C3 . MPU CSWR + Core inactive */ {50 +50 ,300 ,1 }, -/* C4 */ +/* C4 . MPU OFF + Core inactive */ {1500 +1800 ,4000 ,1 }, -/* C5 */ +/* C5 . MPU RET + Core RET */ {2500 +7500 ,12000 ,1 }, -/* C6 */ +/* C6 . MPU OFF + Core RET */ {3000 +8500 ,15000 ,1 }, -/* C7 */ +/* C7 . MPU OFF + Core OFF */ {10000 +30000 ,300000 ,1 }, };#define OMAP3_NUM_STATES ARRAY_SIZE(cpuidle_params_table)
@@ -64,7 +64,6 @@ static struct cpuidle_params cpuidle_params_table[] = {/* Mach specific information to be recorded in the C-state driver_data */ struct omap3_idle_statedata {u32 mpu_state; -u32 core_state;u8 valid; };struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES ];
@@ -98,7 +97,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev, {struct omap3_idle_statedata *cx =cpuidle_get_statedata (state);struct timespec ts_preidle, ts_postidle, ts_idle; -u32 mpu_state = cx->mpu_state, core_state = cx->core_state; +u32 mpu_state = cx->mpu_state;/* Used to keep track of the total time in idle */ getnstimeofday (&ts_preidle);
@@ -107,7 +106,6 @@ static int omap3_enter_idle(struct cpuidle_device *dev,local_fiq_disable ();pwrdm_set_next_pwrst (mpu_pd, mpu_state); -pwrdm_set_next_pwrst (core_pd, core_state);if (omap_irq_pending () ||need_resched ()) goto return_sleep_time;
@@ -156,6 +154,7 @@ static struct cpuidle_state *next_valid_state(struct cpuidle_device *dev,struct omap3_idle_statedata *cx =cpuidle_get_statedata (curr);u32 mpu_deepest_state =PWRDM_POWER_RET ;u32 core_deepest_state =PWRDM_POWER_RET ; +u32 core_next_state =pwrdm_read_next_pwrst (core_pd);if (enable_off_mode) { mpu_deepest_state =PWRDM_POWER_OFF ;
@@ -171,7 +170,7 @@ static struct cpuidle_state *next_valid_state(struct cpuidle_device *dev,/* Check if current state is valid */ if ((cx->valid) && (cx->mpu_state >= mpu_deepest_state) && - (cx->core_state >= core_deepest_state)) { + (core_next_state >= core_deepest_state)) {return curr; }else {int idx =OMAP3_NUM_STATES -1 ;
@@ -196,7 +195,7 @@ static struct cpuidle_state *next_valid_state(struct cpuidle_device *dev, cx =cpuidle_get_statedata (&dev->states[idx]);if ((cx->valid) && (cx->mpu_state >= mpu_deepest_state) && - (cx->core_state >= core_deepest_state)) { + (core_next_state >= core_deepest_state)) { next = &dev->states[idx];break ; }
@@ -242,19 +241,11 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, }/* -* FIXME: we currently manage device-specific idle states -* for PER and CORE in combination with CPU-specific -* idle states. This is wrong, and device-specific -* idle management needs to be separated out into -* its own code. -*/ - -/* * Prevent PER off if CORE is not in retention or off as this * would disable PER wakeups completely. */ cx =cpuidle_get_statedata (state); - core_next_state = cx->core_state; + core_next_state =pwrdm_read_next_pwrst (core_pd); per_next_state = per_saved_state =pwrdm_read_next_pwrst (per_pd);if ((per_next_state ==PWRDM_POWER_OFF ) && (core_next_state >PWRDM_POWER_RET ))
@@ -346,32 +337,26 @@ int __init omap3_idle_init(void) dev->safe_state = &dev->states[0 ]; cx->valid =1 ;/* C1 is always valid */ cx->mpu_state =PWRDM_POWER_ON ; - cx->core_state =PWRDM_POWER_ON ;/* C2 . MPU WFI + Core inactive */ cx =_fill_cstate (dev,1 ,"MPU ON + CORE ON" ); cx->mpu_state =PWRDM_POWER_ON ; - cx->core_state =PWRDM_POWER_ON ;/* C3 . MPU CSWR + Core inactive */ cx =_fill_cstate (dev,2 ,"MPU RET + CORE ON" ); cx->mpu_state =PWRDM_POWER_RET ; - cx->core_state =PWRDM_POWER_ON ;/* C4 . MPU OFF + Core inactive */ cx =_fill_cstate (dev,3 ,"MPU OFF + CORE ON" ); cx->mpu_state =PWRDM_POWER_OFF ; - cx->core_state =PWRDM_POWER_ON ;/* C5 . MPU RET + Core RET */ cx =_fill_cstate (dev,4 ,"MPU RET + CORE RET" ); cx->mpu_state =PWRDM_POWER_RET ; - cx->core_state =PWRDM_POWER_RET ;/* C6 . MPU OFF + Core RET */ cx =_fill_cstate (dev,5 ,"MPU OFF + CORE RET" ); cx->mpu_state =PWRDM_POWER_OFF ; - cx->core_state =PWRDM_POWER_RET ;/* C7 . MPU OFF + Core OFF */ cx =_fill_cstate (dev,6 ,"MPU OFF + CORE OFF" );
@@ -386,7 +371,6 @@ int __init omap3_idle_init(void) __func__); } cx->mpu_state =PWRDM_POWER_OFF ; - cx->core_state =PWRDM_POWER_OFF ; dev->state_count =OMAP3_NUM_STATES ;if (cpuidle_register_device (dev)) {
arch/arm/mach-omap2/pm.h +15 -2
@@ -43,9 +43,22 @@ static inline int omap4_opp_init(void)* omap3_pm_init_cpuidle */ struct cpuidle_params { -u32 exit_latency;/* exit_latency = sleep + wake-up latencies */ +/* +* exit_latency = sleep + wake-up latencies of the MPU, +* which include the MPU itself and the peripherals needed +* for the MPU to execute instructions (e.g. main memory, +* caches, IRQ controller, MMU etc). Some of those peripherals +* can belong to other power domains than the MPU subsystem and so +* the corresponding latencies must be included in this figure. +*/ +u32 exit_latency; +/* +* target_residency: required amount of time in the C state +* to break even on energy cost +*/ u32 target_residency; -u8 valid;/* validates the C-state */ +/* validates the C-state on the given board */ +u8 valid; };#if defined(CONFIG_PM ) && defined(CONFIG_CPU_IDLE )
Signature · 1 line
1.7.2.5
Quoted 70 lines · On Thursday, August 11, 2011, [email protected] wrote:
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
High level implementation:
1. Preparation of the PM QoS for the addition of a device PM QoS constraints framework:
. rename and move of the PM QoS implementation files tokernel/power/qos.c
andinclude/linux/pm_qos.h
. rename of API parameters and internal fields names
. Move around the PM QoS misc devices management code for better readability . re-organize the internal data structs
. generalize and export the constraints management core code2. Implementation of the per-device PM QoS constraints:
. createdrivers/base/power/qos.cfor the implementation
. create a device PM QoS API, which calls the PM QoS constraints management
core code
. the per-device latency constraints data strctures are stored in the device
dev_pm_infostruct
. the device PM code calls the init and destroy of the per-device constraints
data struct in order to support the dynamic insertion and removal of the devices in the system.
. to minimize the data usage by the per-device constraints, the data struct
is only allocated at the first call todev_pm_qos_add_request. The data is later free'd when the device is removed from the system
. per-device notification callbacks can be registered and called upon a
change to the aggregated constraint value3. add a global notification mechanism for the device constraints . add a global notification chain that gets called upon changes to the aggregated constraint value for any device.
. the notification callbacks are passing the full constraint request data
in order for the callees to have access to it. The current use is for the platform low-level code to access the target device of the constraint4. Implement the OMAP low level constraints management code
. create a PM layer plugin for per-device constraints, compiled under
CONFIG_OMAP_PM_CONSTRAINTS=y
. implement the devices wake-up latency constraints using the global
device PM QoS notification handler which applies the constraints to the underlying layer
. implement the low level code which controls the power domains next power
states, through the hwmod and pwrdm layers
. add (preliminary) power domains wake-up latency figures for OMAP3&4 . cpuidle is a CPU centric framework so it decides the MPU next power state
based on the MPUexit_latencyandtarget_residencyfigures. The rest of the power domains get their next power state programmed from the devices PM QoS framework, via the devices wake-up latency constraints.
. convert the OMAP I2C driver to the PM QoS API for MPU latency constraintsQuestions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lost
Quoted 6 lines
Based on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove
The patchset looks really good to me, I don't think I have any major complaints about this version.
The only thing I'd like to ask at the moment is whether or not the compilation of drivers/base/power/qos.c should depend on CONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?
Also, I'd like to take the final patchset for 3.2, but I don't feel confident enough about the OMAP patches. If you want me to take them too, please make sure they are ACKed by the OMAP maintainers.
Thanks,
Rafael
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?
I would say it should only depend on CONFIG_PM because the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.
Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.
The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.
For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
Quoted 4 lines
Thanks,
Rafael
Thanks,
Jean
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?
I would say it should only depend on CONFIG_PM because the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.
Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.
The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.
For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
Quoted 4 lines
Thanks,
Rafael
Thanks,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 4 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 8 lines
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
Rafael
Rafael,
Quoted 79 lines · Rafael J. Wysocki
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 8 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
>> 5. re-visit the OMAP power domains states initialization procedure. Currently
>> the power states that have been changed from the constraints API which were
>> applied before the initialization of the power domains are lost
Quoted 6 lines
Quoted 4 lines
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
I am now reworking [06/15] after your comments.
Is that OK timewise?
Quoted 3 lines
Rafael
Thanks,
Jean
Rafael,
Quoted 79 lines · Rafael J. Wysocki
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 8 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
>> 5. re-visit the OMAP power domains states initialization procedure. Currently
>> the power states that have been changed from the constraints API which were
>> applied before the initialization of the power domains are lost
Quoted 6 lines
Quoted 4 lines
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
I am now reworking [06/15] after your comments.
Is that OK timewise?
Quoted 3 lines
Rafael
Thanks,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 82 lines · Jean Pihet
Rafael,
Quoted 79 lines · Rafael J. Wysocki
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 8 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
I am now reworking [06/15] after your comments.
Is that OK timewise?
It should be fine. I still need to have a closer look at [7/15] later today, I'll let you know if there's anything I'd like to change in there.
Thanks,
Rafael
Quoted 82 lines · Jean Pihet
Rafael,
Quoted 79 lines · Rafael J. Wysocki
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 8 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
I am now reworking [06/15] after your comments.
Is that OK timewise?
It should be fine. I still need to have a closer look at [7/15] later today, I'll let you know if there's anything I'd like to change in there.
Thanks,
Rafael
Hi,
Quoted 59 lines · Jean Pihet
Hi Rafael,
2011/8/12 Rafael J. Wysocki <[email protected]>:
Quoted 5 lines · On Thursday, August 11, 2011, [email protected] wrote:
Quoted 4 lines
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
...
Quoted 22 lines
Quoted 22 lines
Questions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lostBased on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Quoted 6 lines
Quoted 3 lines
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/removeThe patchset looks really good to me, I don't think I have any major complaints about this version.
Ok good to hear it! I tried to address all comments and concerns in this release.
Quoted 5 lines
The only thing I'd like to ask at the moment is whether or not the compilation of
drivers/base/power/qos.cshould depend onCONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?I would say it should only depend on
CONFIG_PMbecause the dev PM QoS API can be used from any kernel code, being runtime PM code or not. I leave the decision to the PM framework experts.Quoted 2 lines
Also, I'd like to take the final patchset for 3.2,
Ok good!
Quoted 2 lines
but I don't feel
confident enough about the OMAP patches.The OMAP patches have been reviewed a few times already and the comments have been taken into account. Also i has been tested correctly on OMAP3.
Quoted 6 lines
Quoted 2 lines
If you want me to take them too,
please make sure they are ACKed by the OMAP maintainers.For sure I need the Acks. I guess I now need to annoy OMAP folks about it ;p In the case the Acks are not gathered on time the generic patches could be merged in, then the OMAP generic code. Do you think it is a viable option?
Yes, it is. I can take patches [1-7/15] alone.
Quoted 4 lines
The only concern I have is about the on-going OMAP PM initialization clean-up task, cf. ToDo list:
Quoted 1 line
Quoted 1 line
5. re-visit the OMAP power domains states initialization
procedure. Currently
Quoted 8 lines
Quoted 1 line
Quoted 1 line
the power states that have been changed from the constraints
API which were
Quoted 1 line
Quoted 1 line
applied before the initialization of the power domains are lost
On the other hand some testing is needed on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove functions. I tested the SD card insertion/removal on OMAP3.
OK, so are you going to make any more changes to patches [1-7/15]?
Rafael
Quoted 70 lines · On Thursday, August 11, 2011, [email protected] wrote:
From: Jean Pihet <[email protected]>
This patch set is in an RFC state, for review and comments.
High level implementation:
1. Preparation of the PM QoS for the addition of a device PM QoS constraints framework:
. rename and move of the PM QoS implementation files tokernel/power/qos.c
andinclude/linux/pm_qos.h
. rename of API parameters and internal fields names
. Move around the PM QoS misc devices management code for better readability . re-organize the internal data structs
. generalize and export the constraints management core code2. Implementation of the per-device PM QoS constraints:
. createdrivers/base/power/qos.cfor the implementation
. create a device PM QoS API, which calls the PM QoS constraints management
core code
. the per-device latency constraints data strctures are stored in the device
dev_pm_infostruct
. the device PM code calls the init and destroy of the per-device constraints
data struct in order to support the dynamic insertion and removal of the devices in the system.
. to minimize the data usage by the per-device constraints, the data struct
is only allocated at the first call todev_pm_qos_add_request. The data is later free'd when the device is removed from the system
. per-device notification callbacks can be registered and called upon a
change to the aggregated constraint value3. add a global notification mechanism for the device constraints . add a global notification chain that gets called upon changes to the aggregated constraint value for any device.
. the notification callbacks are passing the full constraint request data
in order for the callees to have access to it. The current use is for the platform low-level code to access the target device of the constraint4. Implement the OMAP low level constraints management code
. create a PM layer plugin for per-device constraints, compiled under
CONFIG_OMAP_PM_CONSTRAINTS=y
. implement the devices wake-up latency constraints using the global
device PM QoS notification handler which applies the constraints to the underlying layer
. implement the low level code which controls the power domains next power
states, through the hwmod and pwrdm layers
. add (preliminary) power domains wake-up latency figures for OMAP3&4 . cpuidle is a CPU centric framework so it decides the MPU next power state
based on the MPUexit_latencyandtarget_residencyfigures. The rest of the power domains get their next power state programmed from the devices PM QoS framework, via the devices wake-up latency constraints.
. convert the OMAP I2C driver to the PM QoS API for MPU latency constraintsQuestions:
1. the user space API is still under discussions on linux-omap and linux-pm MLs, cf. [1]. The idea is to add a user-space API for the devices constratins PM QoS, using a sysfs entry per device[1] http://marc.info/?l=linux-omap&m=131232344503327&w=2
ToDo:
1. write Documentation for the new PM QoS class, once the RFC is agreed on
2. validate the constraints framework on OMAP4 HW (done on OMAP3)
3. Need testing on platforms other than OMAP
4. refine the power domains wake-up latency and the cpuidle figures
5. re-visit the OMAP power domains states initialization procedure. Currently the power states that have been changed from the constraints API which were applied before the initialization of the power domains are lost
Quoted 6 lines
Based on the master branch of the linux-omap git tree (3.0.0-rc7). Compile tested using OMAP and x86 generic defconfigs.
Lightly tested on OMAP3 Beagleboard (ES2.x).
Need testing on platforms other than OMAP, because of the impact on the device insertion/removal in device_pm_add/remove
The patchset looks really good to me, I don't think I have any major complaints about this version.
The only thing I'd like to ask at the moment is whether or not the compilation of drivers/base/power/qos.c should depend on CONFIG_PM_RUNTIME. Do you think it will be used by system suspend code on any platforms?
Also, I'd like to take the final patchset for 3.2, but I don't feel confident enough about the OMAP patches. If you want me to take them too, please make sure they are ACKed by the OMAP maintainers.
Thanks,
Rafael