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

2014-12-12 Thread Radim Krcmar
2014-12-10 15:57-0500, Marcelo Tosatti: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any scenario

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

2014-12-11 Thread Paolo Bonzini
On 11/12/2014 04:07, Marcelo Tosatti wrote: So, on APICv, if the interrupt is in PIR but it has bits 7:4 = PPR[7:4], you have a problem. :( There is no APICv hook that lets you get a vmexit when the PPR becomes low enough. Well, you simply exit earlier and busy spin for VM-exit time.

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

2014-12-11 Thread Andy Lutomirski
On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting

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

2014-12-11 Thread Marcelo Tosatti
On Thu, Dec 11, 2014 at 12:48:36PM -0800, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest,

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

2014-12-11 Thread Andy Lutomirski
On Thu, Dec 11, 2014 at 12:58 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Dec 11, 2014 at 12:48:36PM -0800, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti

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

2014-12-11 Thread Paolo Bonzini
On 11/12/2014 21:48, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance

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

2014-12-11 Thread Andy Lutomirski
On Thu, Dec 11, 2014 at 1:10 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 11/12/2014 21:48, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer

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

2014-12-11 Thread Marcelo Tosatti
On Thu, Dec 11, 2014 at 01:16:52PM -0800, Andy Lutomirski wrote: On Thu, Dec 11, 2014 at 1:10 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 11/12/2014 21:48, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini

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

2014-12-11 Thread Marcelo Tosatti
On Thu, Dec 11, 2014 at 07:27:17PM -0200, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 01:16:52PM -0800, Andy Lutomirski wrote: On Thu, Dec 11, 2014 at 1:10 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 11/12/2014 21:48, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo

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

2014-12-11 Thread Rik van Riel
On 12/11/2014 04:07 PM, Andy Lutomirski wrote: On Thu, Dec 11, 2014 at 12:58 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Dec 11, 2014 at 12:48:36PM -0800, Andy Lutomirski wrote: On 12/10/2014 07:07 PM, Marcelo Tosatti wrote: On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini

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

2014-12-10 Thread Marcelo Tosatti
For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any scenario which requires strict timing regarding timer

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

2014-12-10 Thread Rik van Riel
On 12/10/2014 12:06 PM, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any

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

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 17:53, marcelo.tosa...@amt.cnet wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any

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

2014-12-10 Thread Marcelo Tosatti
On Wed, Dec 10, 2014 at 06:08:14PM +0100, Paolo Bonzini wrote: On 10/12/2014 17:53, marcelo.tosa...@amt.cnet wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to

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

2014-12-10 Thread Marcelo . Tosatti
For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any scenario which requires strict timing regarding timer

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

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 18:34, Marcelo Tosatti wrote: Let's start with a kvm-unit-tests patch to measure this value. I can, but kvm-unit-test register state will not be similar to actual guest state (think host/guest state loading). 7us is about 2 clock cycles. A lightweight vmexit is an order

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

2014-12-10 Thread Marcelo Tosatti
For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any scenario which requires strict timing regarding timer

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

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse. This allows achieving low latencies in cyclictest (or any scenario

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

2014-12-10 Thread Marcelo Tosatti
On Thu, Dec 11, 2014 at 12:37:57AM +0100, Paolo Bonzini wrote: On 10/12/2014 21:57, Marcelo Tosatti wrote: For the hrtimer which emulates the tscdeadline timer in the guest, add an option to advance expiration, and busy spin on VM-entry waiting for the actual expiration time to elapse.