From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH -v9][RFC] mutex: implement adaptive spinning Date: Wed, 14 Jan 2009 12:21:58 +0100 Message-ID: <20090114112158.GA8625@elte.hu> References: <1231774622.4371.96.camel@laptop> <1231859742.442.128.camel@twins> <1231863710.7141.3.camel@twins> <1231864854.7141.8.camel@twins> <1231867314.7141.16.camel@twins> <1231901899.1709.18.camel@think.oraclecorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Peter Zijlstra , Linus Torvalds , "Paul E. McKenney" , Gregory Haskins , Matthew Wilcox , Andi Kleen , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich , Dmitry Adamushko To: Chris Mason Return-path: In-Reply-To: <1231901899.1709.18.camel@think.oraclecorp.com> List-ID: * Chris Mason wrote: > v10 is better that not spinning, but its in the 5-10% range. So, I've > been trying to find ways to close the gap, just to understand exactly > where it is different. > > If I take out: > /* > * If there are pending waiters, join them. > */ > if (!list_empty(&lock->wait_list)) > break; > > > v10 pops dbench 50 up to 1800MB/s. The other tests soundly beat my > spinning and aren't less fair. But clearly this isn't a good solution. i think since we already decided that it's ok to be somewhat unfair (_all_ batching constructs introduce unfairness, so the question is never 'should we?' but 'by how much?'), we should just take this out and enjoy the speed ... Ingo