diff options
author | Venki Pallipadi <venkatesh.pallipadi@intel.com> | 2008-02-29 13:24:32 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-26 00:58:19 -0400 |
commit | 8e92b6605da989c0aa8ff7e33306f36f0efd957c (patch) | |
tree | aafbc4628b907f4134ad91db9b160941f246dfcf /drivers | |
parent | 8b78cf602fd3bd97c0080edd22fe8fd5d0fa7832 (diff) |
cpuidle: fix 100% C0 statistics regression
commit 9b12e18cdc1553de62d931e73443c806347cd974
'ACPI: cpuidle: Support C1 idle time accounting'
was implicated in a 100% C0 idle regression.
http://bugzilla.kernel.org/show_bug.cgi?id=10076
It pointed out a potential problem where the menu governor
may get confused by the C-state residency time from poll
idle or C1 idle, where this timing info is not accurate.
This inaccuracy is due to interrupts being handled
before we account for C-state exit.
Do not mark TIME_VALID for CO poll state.
Mark C1 time as valid only with the MWAIT (CSTATE_FFH) entry method.
This makes governors use the timing information only when it is correct and
eliminates any wrong policy decisions that may result from invalid timing
information.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_idle.c | 4 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 1468f1e92cac..788da9781f80 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1693,7 +1693,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1693 | switch (cx->type) { | 1693 | switch (cx->type) { |
1694 | case ACPI_STATE_C1: | 1694 | case ACPI_STATE_C1: |
1695 | state->flags |= CPUIDLE_FLAG_SHALLOW; | 1695 | state->flags |= CPUIDLE_FLAG_SHALLOW; |
1696 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | 1696 | if (cx->entry_method == ACPI_CSTATE_FFH) |
1697 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | ||
1698 | |||
1697 | state->enter = acpi_idle_enter_c1; | 1699 | state->enter = acpi_idle_enter_c1; |
1698 | dev->safe_state = state; | 1700 | dev->safe_state = state; |
1699 | break; | 1701 | break; |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index d42deb310ac7..fc555a90bb21 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -224,7 +224,7 @@ static void poll_idle_init(struct cpuidle_device *dev) | |||
224 | state->exit_latency = 0; | 224 | state->exit_latency = 0; |
225 | state->target_residency = 0; | 225 | state->target_residency = 0; |
226 | state->power_usage = -1; | 226 | state->power_usage = -1; |
227 | state->flags = CPUIDLE_FLAG_POLL | CPUIDLE_FLAG_TIME_VALID; | 227 | state->flags = CPUIDLE_FLAG_POLL; |
228 | state->enter = poll_idle; | 228 | state->enter = poll_idle; |
229 | } | 229 | } |
230 | #else | 230 | #else |