[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F8CE82D.80503@linux.vnet.ibm.com>
Date: Tue, 17 Apr 2012 09:19:01 +0530
From: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>
To: Marcelo Tosatti <mtosatti@...hat.com>
CC: Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
X86 <x86@...nel.org>, Avi Kivity <avi@...hat.com>,
Jeremy Fitzhardinge <jeremy@...p.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Alexander Graf <agraf@...e.de>,
Stefano Stabellini <stefano.stabellini@...citrix.com>,
Gleb Natapov <gleb@...hat.com>,
Randy Dunlap <rdunlap@...otime.net>, linux-doc@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>,
Virtualization <virtualization@...ts.linux-foundation.org>,
Xen <xen-devel@...ts.xensource.com>,
Sasha Levin <levinsasha928@...il.com>,
Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
Subject: Re: [PATCH RFC V5 2/6] kvm hypervisor : Add a hypercall to KVM hypervisor
to support pv-ticketlocks
Sorry for late reply,
was on vacation for a week (without IMAP access :( )
On 04/12/2012 05:36 AM, Marcelo Tosatti wrote:
> On Fri, Mar 23, 2012 at 01:37:04PM +0530, Raghavendra K T wrote:
>> From: Srivatsa Vaddagiri<vatsa@...ux.vnet.ibm.com>
[snip]
>> @@ -1567,6 +1568,9 @@ void kvm_vcpu_block(struct kvm_vcpu *vcpu)
>> prepare_to_wait(&vcpu->wq,&wait, TASK_INTERRUPTIBLE);
>>
>> if (kvm_arch_vcpu_runnable(vcpu)) {
>> + vcpu->pv_unhalted = 0;
>> + /* preventing reordering should be enough here */
>> + barrier();
>
> Is it always OK to erase the notification, even in case an unrelated
> event such as interrupt was the source of wakeup?
Erasing notification is not good, But I think in this case,
kvm_make_request(KVM_REQ_UNHALT, vcpu);
below this would take care of the rest.
>
> It would be easier to verify that notifications are not lost with atomic
>
> test_and_clear(pv_unhalted).
true, I 'll verify that (with pv_unhalt as atomic variable). my heart
says current code is just fine, since we are about to unblock.
>
> Also x86 specific code should remain in arch/x86/kvm/
>
I agree. 'll have clear function in arch/x86/kvm and add stub to rest
of the archs
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists