| 
         
xen-devel
[Xen-devel] Re: [PATCH RFC V2 3/5] kvm hypervisor : Add two hypercalls t
 
| 
To:  | 
Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx> | 
 
| 
Subject:  | 
[Xen-devel] Re: [PATCH RFC V2 3/5] kvm hypervisor : Add two hypercalls to support pv-ticketlock | 
 
| 
From:  | 
Avi Kivity <avi@xxxxxxxxxx> | 
 
| 
Date:  | 
Mon, 24 Oct 2011 15:09:25 +0200 | 
 
| 
Cc:  | 
Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>,	Dave Jiang <dave.jiang@xxxxxxxxx>, KVM <kvm@xxxxxxxxxxxxxxx>,	Gleb Natapov <gleb@xxxxxxxxxx>,	Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>,	Peter Zijlstra <peterz@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,	Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>, x86@xxxxxxxxxx,	Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>,	Marcelo Tosatti <mtosatti@xxxxxxxxxx>,	Suzuki Poulose <suzuki@xxxxxxxxxxxxxxxxxx>,	Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>,	Sedat Dilek <sedat.dilek@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Ingo Molnar <mingo@xxxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>,	Greg Kroah-Hartman <gregkh@xxxxxxx>,	Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> | 
 
| 
Delivery-date:  | 
Tue, 25 Oct 2011 10:02:09 -0700 | 
 
| 
Envelope-to:  | 
www-data@xxxxxxxxxxxxxxxxxxx | 
 
| 
In-reply-to:  | 
<20111024122734.GA10634@xxxxxxxxxxxxxxxxxx> | 
 
| 
List-help:  | 
<mailto:xen-devel-request@lists.xensource.com?subject=help> | 
 
| 
List-id:  | 
Xen developer discussion <xen-devel.lists.xensource.com> | 
 
| 
List-post:  | 
<mailto:xen-devel@lists.xensource.com> | 
 
| 
List-subscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe> | 
 
| 
List-unsubscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> | 
 
| 
References:  | 
<20111023190307.16364.35381.sendpatchset@xxxxxxxxxxxxxxxxxxxx>	<20111023190558.16364.2136.sendpatchset@xxxxxxxxxxxxxxxxxxxx>	<4EA53A7D.300@xxxxxxxxxx>	<20111024122734.GA10634@xxxxxxxxxxxxxxxxxx> | 
 
| 
Sender:  | 
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx | 
 
| 
User-agent:  | 
Mozilla/5.0 (X11; Linux x86_64;	rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 | 
 
 
 
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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    |