perf_counter: Generic per counter interrupt throttle
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 25 May 2009 15:39:05 +0000 (17:39 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 25 May 2009 19:41:12 +0000 (21:41 +0200)
commita78ac3258782f3e64cb40beb5990808e1febcc0c
tree692462a974e4c26bdb7fa7fae727a6b326a0eeee
parent48e22d56ecdeddd1ffb42a02fccba5c6ef42b133
perf_counter: Generic per counter interrupt throttle

Introduce a generic per counter interrupt throttle.

This uses the perf_counter_overflow() quick disable to throttle a specific
counter when its going too fast when a pmu->unthrottle() method is provided
which can undo the quick disable.

Power needs to implement both the quick disable and the unthrottle method.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <20090525153931.703093461@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c
include/linux/perf_counter.h
kernel/perf_counter.c
kernel/sysctl.c