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

From: Avi Kivity
Date: Mon Oct 24 2011 - 09:10:30 EST


On 10/24/2011 02:27 PM, Srivatsa Vaddagiri wrote:
> 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.

Not if interrupts are disabled. My original plan was to use NMIs for
wakeups, but it turns out NMIs can be coalesced under certain rare
circumstances; this requires workarounds by the generic NMI code that
make NMIs too slow.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/