Thread (8 messages) 8 messages, 4 authors, 2012-12-11

Re: [RFC] cpuidle - remove the power_specified field in the driver

From: Julius Werner <jwerner@chromium.org>
Date: 2012-12-10 19:10:03
Also in: lkml

Hi,

What is the current status of this? Daniel, do you think you have got
enough feedback to submit a definitive patch for this? Rafael, would
you approve of such a change?

The bug with dynamically added C-states that is tied to this still
hurts the battery life for some users across all distros every day, so
I think it would be valuable to get a consistent solution into the
mainline soon before everyone has to roll their own.

On 11/12/2012 09:26 PM, Daniel Lezcano wrote:
This patch follows the discussion about reinitializing the power usage
when a C-state is added/removed.

 https://lkml.org/lkml/2012/10/16/518

We realized the power usage field is never filled and when it is
filled for tegra, the power_specified flag is not set making all these
values to be resetted when the driver is initialized with the set_power_state
function.

Julius and I feel this is over-engineered and the power_specified
flag could be simply removed and continue assuming the states are
backward sorted.

The menu governor select function is simplified as the power is ordered.
Actually the condition is always true with the current code.

The cpuidle_play_dead function is also simplified by doing a reverse lookup
on the array.

The set_power_states function is removed as it does no make sense anymore.

Signed-off-by: Daniel Lezcano <redacted>
---
 drivers/cpuidle/cpuidle.c        |   17 ++++-------------
 drivers/cpuidle/driver.c         |   25 -------------------------
 drivers/cpuidle/governors/menu.c |    8 ++------
 include/linux/cpuidle.h          |    2 +-
 4 files changed, 7 insertions(+), 45 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help