From: Keir Fraser Date: Wed, 10 Sep 2008 10:17:13 +0000 (+0100) Subject: CPUIDLE: Adjust Cx residency to contain Cx exit latency & overhead. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14111^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9851c8e77e8da55e5bef15e52048669480e38f1d;p=xen.git CPUIDLE: Adjust Cx residency to contain Cx exit latency & overhead. Signed-off-by: Wei Gang --- diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index cd597b0b11..ae8f3bc599 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -402,8 +402,7 @@ static void acpi_processor_idle(void) /* Re-enable interrupts */ local_irq_enable(); /* Compute time (ticks) that we were actually asleep */ - sleep_ticks = - ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD; + sleep_ticks = ticks_elapsed(t1, t2); break; case ACPI_STATE_C3: @@ -471,8 +470,6 @@ static void acpi_processor_idle(void) lapic_timer_on(); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2); - /* Do not account our idle-switching overhead: */ - sleep_ticks -= cx->latency_ticks + C3_OVERHEAD; break; @@ -482,7 +479,7 @@ static void acpi_processor_idle(void) } cx->usage++; - if ( (cx->type != ACPI_STATE_C1) && (sleep_ticks > 0) ) + if ( sleep_ticks > 0 ) cx->time += sleep_ticks; next_state = power->state;