From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning Date: Wed, 7 Jan 2009 15:32:11 -0800 (PST) Message-ID: References: <1231283778.11687.136.camel@twins> <1231329783.11687.287.camel@twins> <1231347442.11687.344.camel@twins> <20090107210923.GV2002@parisc-linux.org> <20090107213924.GP496@one.firstfloor.org> <49652C7C.3000909@novell.com> <20090107223317.GB27629@elte.hu> <4965331E.8090202@novell.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Gregory Haskins , Ingo Molnar , Andi Kleen , Matthew Wilcox , Peter Zijlstra , paulmck@linux.vnet.ibm.com, Chris Mason , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich To: Steven Rostedt Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:35494 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753908AbZAGXdS (ORCPT ); Wed, 7 Jan 2009 18:33:18 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 7 Jan 2009, Steven Rostedt wrote: > > What would be interesting is various benchmarks against all three. > > 1) no mutex spinning. > 2) get_task_struct() implementation. > 3) spin_or_sched implementation. One of the issues is that I cannot convince myself that (2) is even necessarily correct. At least not without having all cases happen inder the mutex spinlock - which they don't. Even with the original patch, the uncontended cases set and cleared the owner field outside the lock. Linus