From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751662Ab2CaEKH (ORCPT ); Sat, 31 Mar 2012 00:10:07 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:40959 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792Ab2CaEKB (ORCPT ); Sat, 31 Mar 2012 00:10:01 -0400 Date: Sat, 31 Mar 2012 09:39:15 +0530 From: Srivatsa Vaddagiri To: Thomas Gleixner Cc: "H. Peter Anvin" , Raghavendra K T , Ingo Molnar , Linus Torvalds , Peter Zijlstra , the arch/x86 maintainers , LKML , Avi Kivity , Marcelo Tosatti , KVM , Andi Kleen , Xen Devel , Konrad Rzeszutek Wilk , Virtualization , Jeremy Fitzhardinge , Stephan Diestelhorst , Stefano Stabellini , Attilio Rao Subject: Re: [PATCH RFC V6 0/11] Paravirtualized ticketlocks Message-ID: <20120331040915.GF13345@linux.vnet.ibm.com> Reply-To: Srivatsa Vaddagiri References: <20120321102041.473.61069.sendpatchset@codeblue.in.ibm.com> <4F7616F5.4070000@zytor.com> <20120331040745.GC14030@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20120331040745.GC14030@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) x-cbid: 12033018-6102-0000-0000-0000012529DE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Srivatsa Vaddagiri [2012-03-31 09:37:45]: > The issue is with ticketlocks though. VCPUs could go into a spin w/o > a lock being held by anybody. Say VCPUs 1-99 try to grab a lock in > that order (on a host with one cpu). VCPU1 wins (after VCPU0 releases it) > and releases the lock. VCPU1 is next eligible to take the lock. If Sorry I meant to say "VCPU2 is next eligible ..." > that is not scheduled early enough by host, then remaining vcpus would keep > spinning (even though lock is technically not held by anybody) w/o making > forward progress. > > In that situation, what we really need is for the guest to hint to host > scheduler to schedule VCPU1 early (via yield_to or something similar). s/VCPU1/VCPU2 .. - vatsa