Re: [PATCH V2 RFC 2/3] kvm: Handle yield_to failure return code for potential undercommit case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/31/2012 06:08 PM, Avi Kivity wrote:
On 10/29/2012 04:07 PM, Raghavendra K T wrote:
From: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>

Also we do not update last boosted vcpu in failure cases.

  #endif
+
  void kvm_vcpu_on_spin(struct kvm_vcpu *me)
  {
  	struct kvm *kvm = me->kvm;
@@ -1727,11 +1727,12 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
  				continue;
  			if (!kvm_vcpu_eligible_for_directed_yield(vcpu))
  				continue;
-			if (kvm_vcpu_yield_to(vcpu)) {
+
+			yielded = kvm_vcpu_yield_to(vcpu);
+			if (yielded > 0)
  				kvm->last_boosted_vcpu = i;
-				yielded = 1;
+			if (yielded)
  				break;
-			}
  		}

If yielded == -ESRCH, should we not try to yield to another vcpu?


Yes. plan is to abort the iteration. since it means we are mostly undercommitted.


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux