From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH RFC v5 7/8] pvqspinlock, x86: Add qspinlock para-virtualization support Date: Thu, 27 Feb 2014 15:45:44 +0100 Message-ID: <530F4F98.2080308@redhat.com> References: <1393427668-60228-1-git-send-email-Waiman.Long@hp.com> <1393427668-60228-8-git-send-email-Waiman.Long@hp.com> <530F2B8F.1010401@citrix.com> <530F3967.6030805@redhat.com> <530F4949.4050706@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <530F4949.4050706@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: David Vrabel Cc: Jeremy Fitzhardinge , Raghavendra K T , Peter Zijlstra , virtualization@lists.linux-foundation.org, Andi Kleen , "H. Peter Anvin" , Michel Lespinasse , Alok Kataria , linux-arch@vger.kernel.org, Boris Ostrovsky , x86@kernel.org, Ingo Molnar , Scott J Norton , xen-devel@lists.xenproject.org, "Paul E. McKenney" , Alexander Fyodorov , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Daniel J Blueman , Oleg Nesterov , Steven Rostedt , Chris Wright , George Spelvin List-Id: linux-arch.vger.kernel.org Il 27/02/2014 15:18, David Vrabel ha scritto: > On 27/02/14 13:11, Paolo Bonzini wrote: >> Il 27/02/2014 13:11, David Vrabel ha scritto: >>>>> This patch adds para-virtualization support to the queue spinlock code >>>>> by enabling the queue head to kick the lock holder CPU, if known, >>>>> in when the lock isn't released for a certain amount of time. It >>>>> also enables the mutual monitoring of the queue head CPU and the >>>>> following node CPU in the queue to make sure that their CPUs will >>>>> stay scheduled in. >>> I'm not really understanding how this is supposed to work. There >>> appears to be an assumption that a guest can keep one of its VCPUs >>> running by repeatedly kicking it? This is not possible under Xen and I >>> doubt it's possible under KVM or any other hypervisor. >> >> KVM allows any VCPU to wake up a currently halted VCPU of its choice, >> see Documentation/virtual/kvm/hypercalls.txt. > > But neither of the VCPUs being kicked here are halted -- they're either > running or runnable (descheduled by the hypervisor). /me actually looks at Waiman's code... Right, this is really different from pvticketlocks, where the *unlock* primitive wakes up a sleeping VCPU. It is more similar to PLE (pause-loop exiting). Paolo