ia64/xen-unstable

changeset 18472:cfbe4df8d47c

CPUIDLE: Adjust Cx residency to contain Cx exit latency & overhead.

Signed-off-by: Wei Gang <gang.wei@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Sep 10 11:17:13 2008 +0100 (2008-09-10)
parents 020b8340e839
children 706844309f36
files xen/arch/x86/acpi/cpu_idle.c
line diff
     1.1 --- a/xen/arch/x86/acpi/cpu_idle.c	Wed Sep 10 11:16:26 2008 +0100
     1.2 +++ b/xen/arch/x86/acpi/cpu_idle.c	Wed Sep 10 11:17:13 2008 +0100
     1.3 @@ -402,8 +402,7 @@ static void acpi_processor_idle(void)
     1.4          /* Re-enable interrupts */
     1.5          local_irq_enable();
     1.6          /* Compute time (ticks) that we were actually asleep */
     1.7 -        sleep_ticks =
     1.8 -            ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD;
     1.9 +        sleep_ticks = ticks_elapsed(t1, t2);
    1.10          break;
    1.11  
    1.12      case ACPI_STATE_C3:
    1.13 @@ -471,8 +470,6 @@ static void acpi_processor_idle(void)
    1.14          lapic_timer_on();
    1.15          /* Compute time (ticks) that we were actually asleep */
    1.16          sleep_ticks = ticks_elapsed(t1, t2);
    1.17 -        /* Do not account our idle-switching overhead: */
    1.18 -        sleep_ticks -= cx->latency_ticks + C3_OVERHEAD;
    1.19  
    1.20          break;
    1.21  
    1.22 @@ -482,7 +479,7 @@ static void acpi_processor_idle(void)
    1.23      }
    1.24  
    1.25      cx->usage++;
    1.26 -    if ( (cx->type != ACPI_STATE_C1) && (sleep_ticks > 0) )
    1.27 +    if ( sleep_ticks > 0 )
    1.28          cx->time += sleep_ticks;
    1.29  
    1.30      next_state = power->state;