• Peter Zijlstra's avatar
    perf_counter: More aggressive frequency adjustment · bd2b5b12
    Peter Zijlstra authored
    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: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
    bd2b5b12
perf_counter.c 39.2 KB