Re: [patch 2/3] KVM: x86: add option to advance tscdeadline hrtimer expiration

Paolo Bonzini
2014-12-17T17:48:31Z

On 17/12/2014 18:41, Marcelo Tosatti wrote:
>> > Btw. simple automatic delta tuning had worse results?
> Haven't tried automatic tuning.
>
> So what happens on a realtime environment is this: you execute the fixed
> number of instructions from interrupt handling all the way to VM-entry.
>
> Well, almost fixed. Fixed is the number of apic_timer_fn plus KVM
> instructions. You can also execute host scheduler and timekeeping
> processing.
>
> In practice, the length to execute that instruction sequence is a bell
> shaped normal distribution around the average (the right side is
> slightly higher due to host scheduler and timekeeping processing).
>
> You want to advance the timer by the rightmost bucket, that way you
> guarantee lower possible latencies (which is the interest here).
>
> That said, i don't see advantage in automatic tuning for the usecase
> which this targets.

Yeah, the value of the parameter can be computed pretty easily from
either the tracepoint or the kvm-unit-tests testcase.

Paolo