Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755841AbZANSmI (ORCPT ); Wed, 14 Jan 2009 13:42:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753331AbZANSlv (ORCPT ); Wed, 14 Jan 2009 13:41:51 -0500 Received: from acsinet12.oracle.com ([141.146.126.234]:21700 "EHLO acsinet12.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752845AbZANSlt (ORCPT ); Wed, 14 Jan 2009 13:41:49 -0500 Subject: Re: [GIT PULL] adaptive spinning mutexes From: Chris Mason To: Ingo Molnar Cc: Linus Torvalds , Peter Zijlstra , "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 , Johannes Weiner In-Reply-To: <20090114183319.GA18630@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> <1231952436.14825.28.camel@laptop> <20090114183319.GA18630@elte.hu> Content-Type: text/plain Date: Wed, 14 Jan 2009 13:40:46 -0500 Message-Id: <1231958447.8269.30.camel@think.oraclecorp.com> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1 Content-Transfer-Encoding: 7bit X-Source-IP: acsmt701.oracle.com [141.146.40.71] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A01020A.496E31B4.01E4:SCFSTAT928724,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1582 Lines: 56 On Wed, 2009-01-14 at 19:33 +0100, Ingo Molnar wrote: > * Peter Zijlstra wrote: > > > Full series, including changelogs available at: > > > > http://programming.kicks-ass.net/kernel-patches/mutex-adaptive-spin/ > > > > and should shortly appear in a git tree near Ingo :-) > > Linus, > > Please pull the adaptive-mutexes-for-linus git tree from: > > git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git adaptive-mutexes-for-linus > I was going to put this into the btrfs tree, but since you have a branch just for adaptive mutexes, is it easier to put there? From: Chris Mason Btrfs: stop spinning on mutex_trylock and let the adaptive code spin for us Mutexes now spin internally and the btrfs spin is no longer required for performance. Signed-off-by: Chris Mason diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 39bae77..40ba8e8 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -37,16 +37,6 @@ int btrfs_tree_lock(struct extent_buffer *eb) { - int i; - - if (mutex_trylock(&eb->mutex)) - return 0; - for (i = 0; i < 512; i++) { - cpu_relax(); - if (mutex_trylock(&eb->mutex)) - return 0; - } - cpu_relax(); mutex_lock_nested(&eb->mutex, BTRFS_MAX_LEVEL - btrfs_header_level(eb)); return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/