]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
perf_counter: More aggressive frequency adjustment
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 10 Jun 2009 11:40:57 +0000 (13:40 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Jun 2009 14:55:26 +0000 (16:55 +0200)
commitbd2b5b12849a3446abad0b25e920f86f5480b309
treeb0eacf6002f2015c0483390619a3f874bcb7e7d2
parentdc81081b2d9a6a9d64dad1bef1e5fc9fb660e53e
perf_counter: More aggressive frequency adjustment

Also employ the overflow handler to adjust the frequency, this results
in a stable frequency in about 40~50 samples, instead of that many ticks.

This also means we can start sampling at a sample period of 1 without
running head-first into the throttle.

It relies on sched_clock() to accurately measure the time difference
between the overflow NMIs.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/perf_counter.c
include/linux/perf_counter.h
kernel/perf_counter.c