Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-22 Thread Daniel Lezcano
On 10/22/2012 07:13 PM, Julius Werner wrote: >> Could we just say this is always true because state[i+1] consumes less >> than state[i] ? >> >> And then just remove the 'set_power_state' function, and the field >> 'driver->power_specified' ? >> >> That will cleanup the code and fix this problem,

Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-22 Thread Julius Werner
> Could we just say this is always true because state[i+1] consumes less > than state[i] ? > > And then just remove the 'set_power_state' function, and the field > 'driver->power_specified' ? > > That will cleanup the code and fix this problem, no ? I totally agree with your analysis. Even if a

Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-22 Thread Julius Werner
Could we just say this is always true because state[i+1] consumes less than state[i] ? And then just remove the 'set_power_state' function, and the field 'driver-power_specified' ? That will cleanup the code and fix this problem, no ? I totally agree with your analysis. Even if a driver

Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-22 Thread Daniel Lezcano
On 10/22/2012 07:13 PM, Julius Werner wrote: Could we just say this is always true because state[i+1] consumes less than state[i] ? And then just remove the 'set_power_state' function, and the field 'driver-power_specified' ? That will cleanup the code and fix this problem, no ? I

Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-20 Thread Daniel Lezcano
On 10/19/2012 11:50 PM, Julius Werner wrote: > When cpuidle drivers do not supply explicit power_usage values, > cpuidle/driver.c inserts dummy values instead. When a running processor > dynamically gains new C-states (e.g. after ACPI events), the power_usage > values of those states will stay

Re: [PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-20 Thread Daniel Lezcano
On 10/19/2012 11:50 PM, Julius Werner wrote: When cpuidle drivers do not supply explicit power_usage values, cpuidle/driver.c inserts dummy values instead. When a running processor dynamically gains new C-states (e.g. after ACPI events), the power_usage values of those states will stay

[PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-19 Thread Julius Werner
When cpuidle drivers do not supply explicit power_usage values, cpuidle/driver.c inserts dummy values instead. When a running processor dynamically gains new C-states (e.g. after ACPI events), the power_usage values of those states will stay uninitialized, and cpuidle governors will never choose

[PATCH] acpi/cpuidle: reinitialize power_usage values when adding/removing C-states

2012-10-19 Thread Julius Werner
When cpuidle drivers do not supply explicit power_usage values, cpuidle/driver.c inserts dummy values instead. When a running processor dynamically gains new C-states (e.g. after ACPI events), the power_usage values of those states will stay uninitialized, and cpuidle governors will never choose