• Bharat Bhushan's avatar
    KVM: PPC: Use clockevent multiplier and shifter for decrementer · 6e35994d
    Bharat Bhushan authored
    Time for which the hrtimer is started for decrementer emulation is calculated
    using tb_ticks_per_usec. While hrtimer uses the clockevent for DEC
    reprogramming (if needed) and which calculate timebase ticks using the
    multiplier and shifter mechanism implemented within clockevent layer.
    
    It was observed that this conversion (timebase->time->timebase) are not
    correct because the mechanism are not consistent.
    In our setup it adds 2% jitter.
    
    With this patch clockevent multiplier and shifter mechanism are used when
    starting hrtimer for decrementer emulation. Now the jitter is < 0.5%.
    Signed-off-by: default avatarBharat Bhushan <bharat.bhushan@freescale.com>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    6e35994d
emulate.c 13.2 KB