From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [kvm-devel] pinning, tsc and apic Date: Wed, 18 Jun 2008 06:12:59 -0700 Message-ID: <485909DB.1030206@qumranet.com> References: <20080512191923.GU17938@us.ibm.com> <20080514232506.GA18079@dmt> <482B7983.1030000@codemonkey.ws> <20080515065912.GE4017@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , kvm@vger.kernel.org, Marcelo Tosatti To: Chris Wright Return-path: In-Reply-To: <20080515065912.GE4017@sequoia.sous-sol.org> Sender: kvm-owner@vger.kernel.org List-ID: (catching up on unread email) Chris Wright wrote: > Is this with pinning? We at least know we're losing small bits on > migration. From my measurements it's ~3000 (outliers are 10-20k). > > Also, what happens if you roll back to kvm-userspace 7f5c4d15ece5? > > I'm using this: > > diff -up arch/x86/kvm/svm.c~svm arch/x86/kvm/svm.c > --- arch/x86/kvm/svm.c~svm 2008-04-16 19:49:44.000000000 -0700 > +++ arch/x86/kvm/svm.c 2008-05-14 23:44:18.000000000 -0700 > @@ -621,6 +621,13 @@ static void svm_free_vcpu(struct kvm_vcp > kmem_cache_free(kvm_vcpu_cache, svm); > } > > +static void svm_tsc_update(void *arg) > +{ > + struct vcpu_svm *svm = arg; > + rdtscll(svm->vcpu.arch.host_tsc); > + > +} > + > static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) > { > struct vcpu_svm *svm = to_svm(vcpu); > @@ -633,6 +640,9 @@ static void svm_vcpu_load(struct kvm_vcp > * Make sure that the guest sees a monotonically > * increasing TSC. > */ > + if (vcpu->cpu != -1) > + smp_call_function_single(vcpu->cpu, svm_tsc_update, > + svm, 0, 1); > rdtscll(tsc_this); > delta = vcpu->arch.host_tsc - tsc_this; > svm->vmcb->control.tsc_offset += delta; > > Would like to apply, but want changelog and signoff. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.