perfcounters: throttle on too high IRQ rates
authorMike Galbraith <efault@gmx.de>
Fri, 23 Jan 2009 09:13:01 +0000 (10:13 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 23 Jan 2009 10:33:18 +0000 (11:33 +0100)
commit1b023a96d9b44f50f4d8ff28c15f5b80e354760f
tree8b6a5956c4461c13c2e2b3769096afac5b767524
parent05e3423c8577126800841bc55de8a509f2433dca
perfcounters: throttle on too high IRQ rates

Starting kerneltop with only -c 100 seems to be a bad idea, it can
easily lock the system due to perfcounter IRQ overload.

So add throttling: if a new IRQ arrives in a shorter than
PERFMON_MIN_PERIOD_NS time, turn off perfcounters and untrottle them
from the next timer tick.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic.c
arch/x86/kernel/cpu/perf_counter.c
include/linux/perf_counter.h