[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC V6 0/11] Paravirtualized ticketlocks
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. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |