From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753916Ab1ASRuB (ORCPT ); Wed, 19 Jan 2011 12:50:01 -0500 Received: from canuck.infradead.org ([134.117.69.58]:45612 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753455Ab1ASRuA convert rfc822-to-8bit (ORCPT ); Wed, 19 Jan 2011 12:50:00 -0500 Subject: Re: [PATCH 2/3] kvm hypervisor : Add hypercalls to support pv-ticketlock From: Peter Zijlstra To: vatsa@linux.vnet.ibm.com Cc: Jeremy Fitzhardinge , Linux Kernel Mailing List , Nick Piggin , Mathieu Desnoyers , =?ISO-8859-1?Q?Am=E9rico?= Wang , Eric Dumazet , Jan Beulich , Avi Kivity , Xen-devel , "H. Peter Anvin" , Linux Virtualization , Jeremy Fitzhardinge , kvm@vger.kernel.org, suzuki@in.ibm.com In-Reply-To: <20110119172306.GA2863@linux.vnet.ibm.com> References: <20110119164432.GA30669@linux.vnet.ibm.com> <20110119171239.GB726@linux.vnet.ibm.com> <20110119172306.GA2863@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 19 Jan 2011 18:50:15 +0100 Message-ID: <1295459415.28776.146.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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. > > > > KVM_HC_WAIT_FOR_KICK blocks the calling vcpu until another vcpu kicks it or it > > is woken up because of an event like interrupt. > > One possibility is to extend this hypercall to do a directed yield as well, > which needs some more thought. Another issue that needs to be resolved with > pv-ticketlocks is the impact on intra-VM fairness. A guest experiencing heavy > contention can keep yielding cpu, allowing other VMs to get more time than they > deserve. No, yield sucks, if you know the owner you can do actual PI.