From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: Preemptable Ticket Spinlock Date: Mon, 22 Apr 2013 23:01:58 +0200 Message-ID: <1366664518.8337.21.camel@laptop> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Jiannan Ouyang , LKML , Raghavendra K T , 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: Rik van Riel Return-path: In-Reply-To: <5175A277.5080208@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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.