[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111024122734.GA10634@linux.vnet.ibm.com>
Date: Mon, 24 Oct 2011 17:57:34 +0530
From: Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>
To: Avi Kivity <avi@...hat.com>
Cc: Raghavendra K T <raghavendra.kt@...ux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
"H. Peter Anvin" <hpa@...or.com>, Gleb Natapov <gleb@...hat.com>,
Virtualization <virtualization@...ts.linux-foundation.org>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
x86@...nel.org, KVM <kvm@...r.kernel.org>,
Dave Jiang <dave.jiang@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Stefano Stabellini <stefano.stabellini@...citrix.com>,
Xen <xen-devel@...ts.xensource.com>,
Sedat Dilek <sedat.dilek@...il.com>,
Yinghai Lu <yinghai@...nel.org>,
Marcelo Tosatti <mtosatti@...hat.com>,
Ingo Molnar <mingo@...hat.com>, Rik van Riel <riel@...hat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
LKML <linux-kernel@...r.kernel.org>,
Suzuki Poulose <suzuki@...ux.vnet.ibm.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH RFC V2 3/5] kvm hypervisor : Add two hypercalls to
support pv-ticketlock
* Avi Kivity <avi@...hat.com> [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 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