From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: Preemptable Ticket Spinlock Date: Tue, 23 Apr 2013 10:33:00 +0530 Message-ID: <51761604.6080103@linux.vnet.ibm.com> References: <51745650.9050204@redhat.com> <1366631460.4443.3.camel@laptop> <51753289.70406@redhat.com> <1366660147.6454.6.camel@laptop> <517595FA.800@redhat.com> <1366661294.6454.18.camel@laptop> <5175A277.5080208@redhat.com> <1366664518.8337.21.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Rik van Riel , Jiannan Ouyang , LKML , Avi Kivity , Gleb Natapov , Ingo Molnar , Marcelo Tosatti , Srikar , "H. Peter Anvin" , "Nikunj A. Dadhania" , KVM , Thomas Gleixner , Chegu Vinod , "Andrew M. Theurer" , Srivatsa Vaddagiri , Andrew Jones , Karen Noel To: Peter Zijlstra Return-path: In-Reply-To: <1366664518.8337.21.camel@laptop> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 04/23/2013 02:31 AM, Peter Zijlstra wrote: > On Mon, 2013-04-22 at 16:49 -0400, Rik van Riel wrote: >> Given the fairly high cost of rescheduling a VCPU (which is likely >> to include an IPI), versus the short hold time of most spinlocks, >> I have the strong suspicion that your approach would win. > > https://lkml.org/lkml/2012/5/2/101 > > If you schedule too often your SPIN_THRESHOLD is far too low. > > Anyway.. performance can't be that bad, otherwise Jeremey would have > spend as much time on it as he did. When I experimented last time ideal SPIN_THRESHOLD for PLE machine, was around 4k, 8k. Jeremy's experiment was on a non-PLE machine AFAIK, which complemented PLE feature in a nice way with 2k threshold.