aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/cpuidle.h
Commit message (Collapse)AuthorAgeFilesLines
* ACPI/cpuidle: remove unused "power" field from Cx state dataJan Beulich2012-11-021-1/+0
| | | | | | | | It has never been used for anything, and Linux 3.7 doesn't propagate this information anymore. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* cpuidle: remove unused latency_ticks memberJan Beulich2012-09-211-2/+1
| | | | | | | ... and code used only for initializing it. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xenpm, x86: Fix reporting of idle state average residency timesBoris Ostrovsky2012-06-061-0/+2
| | | | | | | | | | | | If CPU stays in the same idle state for the full duration of xenpm sample then average residency may not be reported correctly since usage counter will not be incremented. In addition, in order to calculate averages correctly residence time and usage counter should be read and written atomically. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Committed-by: Keir Fraser <keir@xen.org>
* x86/cpuidle: improve data arrangementJan Beulich2012-03-081-3/+3
| | | | | | | .. to reduce the amount of holes (wasted space). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* XENPF_set_processor_pminfo XEN_PM_CX overflows states arrayEric Chanudet2012-03-081-1/+0
| | | | | | | | | | | | | | | | | | | | Calling XENPF_set_processor_pminfo with XEN_PM_CX could cause states array in "struct acpi_processor_power" to exceed its limit. The array used to be reset (by function cpuidle_init_cpu()) for each hypercall. The patch puts it back that way and adds an assertion to make it clear in case that happens again. Signed-off-by: Eric Chanudet <eric.chanudet@eu.citrix.com> - convert assertion to printk() & bail - eliminate struct acpi_processor_cx's valid member (not read anymore) - further adjustments to one-time-only vs each-time operations in cpuidle_init_cpu() - don't use ACPI_STATE_Cn as array index anymore Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* xen: remove extern function declarations from C files.Tim Deegan2011-05-261-0/+2
| | | | | | | | Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86: don't write_tsc() non-zero values on CPUs updating only the lower 32 bitsKeir Fraser2011-04-151-0/+3
| | | | | | | | | | This means suppressing the uses in time_calibration_tsc_rendezvous(), cstate_restore_tsc(), and synchronize_tsc_slave(), and fixes a boot hang of Linux Dom0 when loading processor.ko on such systems that have support for C states above C1. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86: Clean up efer/ler macros after MSR changes.Keir Fraser2010-06-111-1/+1
| | | | | | Move them out of a header file and make the macros proper functions again. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* apic: clean up msr handlingKeir Fraser2010-06-111-0/+2
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* cpuidle: mwait on softirq_pending & remove wakeup ipisKeir Fraser2010-04-061-0/+2
| | | | | | | | | For cpu which enter deep C state via monitor/mwait, wakeup can be done by writing to the monitored memory. So once monitor softirq_pending, we can remove the redundant ipis. Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Wei Gang <gang.wei@intel.com>
* cpuidle: fix the menu governor to enhance IO performanceKeir Fraser2009-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is a revised version of linux upstream commit 69d25870f20c4b2563304f2b79c5300dd60a067e: " cpuidle: fix the menu governor to boost IO performance Fix the menu idle governor which balances power savings, energy efficiency and performance impact. The reason for a reworked governor is that there have been serious performance issues reported with the existing code on Nehalem server systems. To show this I'm sure Andrew wants to see benchmark results: (benchmark is "fio", "no cstates" is using "idle=3Dpoll") no cstates current linux new algorithm 1 disk 107 Mb/s 85 Mb/s 105 Mb/s 2 disks 215 Mb/s 123 Mb/s 209 Mb/s 12 disks 590 Mb/s 320 Mb/s 585 Mb/s In various power benchmark measurements, no degredation was found by our measurement&diagnostics team. Obviously a small percentage more power was used in the "fio" benchmark, due to the much higher performance. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> " in Xen version, most logic is similar and with only one exception: linux use nr_iowait and loadavg to track the pending I/O request, which however is not visible to Xen. so Xen use the do_irq frequency to estimate the I/O pressure. this is not as accurate as linux, and the better approach is to convey guest latency requirement to hypervisor by virtual C state. this can be the future enhancement. the detail algorithm description is in code comment. with this new algorithm, fio benchmark performance improve ~5% with 1 disk. and no power degration is found in idle case. Signed-off-by: Yu Ke <ke.yu@intel.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-071-0/+1
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* CPUIDLE: Support C1 FFH entryKeir Fraser2008-10-301-1/+6
| | | | | | | Add support for C1 FFH (mwait) entry. Meanwhile add timing for C1. The timing for C1 should be accurate for FFH case, but may not for halt case. Signed-off-by: Wei Gang <gang.wei@intel.com>
* CPUIDLE: add idx fieldKeir Fraser2008-10-301-0/+1
| | | | | | | | This patch adds an idx field in the 'struct acpi_processor_cx'. It can simplify some coding lines. Signed-off-by: Guanqun Lu <guanqun.lu@intel.com> Signed-off-by: Wei Gang <gang.wei@intel.com>=
* CPUIDLE: Port Linux menu governor to replace the initial ladder governorKeir Fraser2008-09-101-0/+82
The ladder governor has long pro/demotion delay shortcome while applying to tickless mode, because it needs to count usage. Menu governor chooses the next state simply via break-event prediction including the factors of next timer event & last residency time etc, so it would have faster response speed. Signed-off-by: Gang Wei <gang.wei@intel.com>