Re: [PATCH RFC V2 3/5] kvm hypervisor : Add two hypercalls to support pv-ticketlock

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

 



* Avi Kivity <avi@xxxxxxxxxx> [2011-10-24 12:14:21]:

> > +/*
> > + * kvm_pv_wait_for_kick_op : Block until kicked by either a KVM_HC_KICK_CPU
> > + * hypercall or a event like interrupt.
> > + *
> > + * @vcpu : vcpu which is blocking.
> > + */
> > +static void kvm_pv_wait_for_kick_op(struct kvm_vcpu *vcpu)
> > +{

[snip]

> > +}
> 
> This hypercall can be replaced by a HLT instruction, no?

Good point. Assuming yield_on_hlt=1, that would allow the vcpu to be put
to sleep and let other vcpus make progress.

I guess with that change, we can also dropthe need for other hypercall
introduced in this patch (kvm_pv_kick_cpu_op()). Essentially a vcpu sleeping 
because of HLT instruction can be woken up by a IPI issued by vcpu releasing a
lock.

- vatsa

--
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