|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: Use deep C states for off-lined CPUs
# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@xxxxxxx>
# Date 1331105430 0
# Node ID 50a70b652b43aacbf923007ba8f645c5024ab698
# Parent 031e696b03d75320dab652a9ec50ef2d91b5a5d0
x86: Use deep C states for off-lined CPUs
Currently when a core is taken off-line it is placed in C1 state
(unless MONITOR/MWAIT is used). This patch allows a core to go to
deeper C states resulting in significantly higher power savings.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 031e696b03d7 -r 50a70b652b43 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c Wed Mar 07 07:28:12 2012 +0000
+++ b/xen/arch/x86/acpi/cpu_idle.c Wed Mar 07 07:30:30 2012 +0000
@@ -566,6 +566,7 @@
{
struct acpi_processor_power *power;
struct acpi_processor_cx *cx;
+ struct cpuinfo_x86 *c = ¤t_cpu_data;
if ( (power = processor_powers[smp_processor_id()]) == NULL )
goto default_halt;
@@ -601,6 +602,23 @@
mb();
__mwait(cx->address, 0);
}
+ }
+ else if ( c->x86_vendor == X86_VENDOR_AMD &&
+ cx->entry_method == ACPI_CSTATE_EM_SYSIO )
+ {
+ /* Intel prefers not to use SYSIO */
+
+ /* Avoid references to shared data after the cache flush */
+ u32 address = cx->address;
+ u32 pmtmr_ioport_local = pmtmr_ioport;
+
+ wbinvd();
+
+ while ( 1 )
+ {
+ inb(address);
+ inl(pmtmr_ioport_local);
+ }
}
else if ( current_cpu_data.x86_vendor == X86_VENDOR_AMD &&
cx->entry_method == ACPI_CSTATE_EM_SYSIO )
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |