perf counters: protect them against CSTATE transitions
authorThomas Gleixner <tglx@linutronix.de>
Tue, 9 Dec 2008 20:43:39 +0000 (21:43 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 11 Dec 2008 14:45:45 +0000 (15:45 +0100)
commit4ac13294e44664bb7edf4daf52edb71e7c6bbe84
treeaccb533350a655e39a8ab846abc37018b2f87ccf
parent43874d238d5f208854a73c3225ca2a22833eec8b
perf counters: protect them against CSTATE transitions

Impact: fix rare lost events problem

There are CPUs whose performance counters misbehave on CSTATE transitions,
so provide a way to just disable/enable them around deep idle methods.

(hw_perf_enable_all() is cheap on x86.)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c
drivers/acpi/processor_idle.c
include/linux/perf_counter.h