Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-02-02 Thread Avi Kivity
On 02/01/2011 09:58 PM, Glauber Costa wrote: Guest reads version (result: 2) Guest starts reading data Live migration; vcpu-arch.sversion is zeroed Steal time update; vcpu-arch.sversion += 2; write to guest Guest continues reading data Guest reads version (result: 2) So the guest

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-02-01 Thread Glauber Costa
On Sun, 2011-01-30 at 15:13 +0200, Avi Kivity wrote: On 01/28/2011 09:52 PM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-02-01 Thread Glauber Costa
On Tue, 2011-02-01 at 19:09 +0200, Avi Kivity wrote: On 02/01/2011 05:48 PM, Glauber Costa wrote: @@ -2106,6 +2120,25 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) kvm_migrate_timers(vcpu); vcpu-cpu = cpu; }

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-31 Thread Peter Zijlstra
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote: + u64 to = (get_kernel_ns() - vcpu-arch.this_time_out); + /* +* using nanoseconds introduces noise, which accumulates easily +* leading to big steal time values. We want,

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-30 Thread Avi Kivity
On 01/28/2011 09:52 PM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In

[PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-28 Thread Glauber Costa
To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this patchset, I am introducing a new msr,

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-28 Thread Rik van Riel
On 01/28/2011 02:52 PM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In