From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 2/3] kvm hypervisor : Add hypercalls to support pv-ticketlock Date: Wed, 19 Jan 2011 18:50:15 +0100 Message-ID: <1295459415.28776.146.camel@laptop> References: <20110119164432.GA30669@linux.vnet.ibm.com> <20110119171239.GB726@linux.vnet.ibm.com> <20110119172306.GA2863@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: Mathieu, Xen-devel , Desnoyers , Nick Piggin , Jeremy, Linux, Jeremy Fitzhardinge , Beulich , Linux Kernel Mailing List , Jan, Fitzhardinge , suzuki@in.ibm.com, Avi Kivity , kvm@vger.kernel.org, "H. Peter Anvin" , =?ISO-8859-1?Q?Am=E9rico?= Wang , Eric Dumazet , Virtualization To: vatsa@linux.vnet.ibm.com Return-path: In-Reply-To: <20110119172306.GA2863@linux.vnet.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com List-Id: kvm.vger.kernel.org On Wed, 2011-01-19 at 22:53 +0530, Srivatsa Vaddagiri wrote: > On Wed, Jan 19, 2011 at 10:42:39PM +0530, Srivatsa Vaddagiri wrote: > > Add two hypercalls to KVM hypervisor to support pv-ticketlocks. > >=20 > > KVM_HC_WAIT_FOR_KICK blocks the calling vcpu until another vcpu kicks i= t or it > > is woken up because of an event like interrupt. >=20 > One possibility is to extend this hypercall to do a directed yield as wel= l,=20 > which needs some more thought. Another issue that needs to be resolved wi= th > pv-ticketlocks is the impact on intra-VM fairness. A guest experiencing h= eavy > contention can keep yielding cpu, allowing other VMs to get more time tha= n they > deserve. No, yield sucks, if you know the owner you can do actual PI.