From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks Date: Mon, 02 Apr 2012 17:45:27 +0530 Message-ID: <4F79985F.5030600@linux.vnet.ibm.com> References: <20120321102041.473.61069.sendpatchset@codeblue.in.ibm.com> <4F707C5F.1000905@redhat.com> <4F716E31.3000803@linux.vnet.ibm.com> <4F73568D.7000703@linux.vnet.ibm.com> <4F743247.5080407@redhat.com> <4F74A405.2040609@linux.vnet.ibm.com> <4F7585EE.7060203@linux.vnet.ibm.com> <4F7855A1.80107@redhat.com> <4F785CC9.7070204@linux.vnet.ibm.com> <4F785DCF.7020809@redhat.com> <4F7976B6.5050000@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F7976B6.5050000@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org To: Avi Kivity , "H. Peter Anvin" Cc: Alan Meadows , Ingo Molnar , Linus Torvalds , Peter Zijlstra , the arch/x86 maintainers , LKML , Marcelo Tosatti , KVM , Andi Kleen , Xen Devel , Konrad Rzeszutek Wilk , Virtualization , Jeremy Fitzhardinge , Stephan Diestelhorst , Srivatsa Vaddagiri , Stefano Stabellini , Attilio Rao List-Id: xen-devel@lists.xenproject.org On 04/02/2012 03:21 PM, Raghavendra K T wrote: > On 04/01/2012 07:23 PM, Avi Kivity wrote: > > On 04/01/2012 04:48 PM, Raghavendra K T wrote: > >>>> I have patch something like below in mind to try: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 5127668..3fa912a 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -1557,12 +1557,17 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn) > mark_page_dirty_in_slot(kvm, memslot, gfn); > } > > +#define YIELD_THRESHOLD 2048 > +static void kvm_vcpu_try_yield_to(struct kvm_vcpu *me); > /* > * The vCPU has executed a HLT instruction with in-kernel mode enabled. > */ > void kvm_vcpu_block(struct kvm_vcpu *vcpu) > { [...] > + if (loop_count++ % YIELD_THRESHOLD) > + schedule(); > + else > + kvm_vcpu_try_yield_to(vcpu); > } > > +static void kvm_vcpu_try_yield(struct kvm_vcpu *me) yes, it is kvm_vcpu_try_yield_to. had changed the name just before sending. sorry.