Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756604AbZAHDZs (ORCPT ); Wed, 7 Jan 2009 22:25:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751778AbZAHDZh (ORCPT ); Wed, 7 Jan 2009 22:25:37 -0500 Received: from victor.provo.novell.com ([137.65.250.26]:44597 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbZAHDZg (ORCPT ); Wed, 7 Jan 2009 22:25:36 -0500 Message-ID: <496572E7.7030203@novell.com> Date: Wed, 07 Jan 2009 22:28:39 -0500 From: Gregory Haskins User-Agent: Thunderbird 2.0.0.18 (X11/20081112) MIME-Version: 1.0 To: Linus Torvalds CC: Steven Rostedt , 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 Subject: Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning 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> In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=D8195319 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE5C41C1C5455FCE08F8F1D06" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1892 Lines: 56 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE5C41C1C5455FCE08F8F1D06 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [resend: restore CC list] >>> Linus Torvalds 01/07/09 6:33 PM >>> >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. Yeah, you are right (see my last post). Without the cmpxchg trickery (*) on the owner field (like we have in -rt) with the pending bits, (2) cannot work. (*) For what its worth, I am impressed with the brilliance of the cmgxchg fast path stuff in the rtmutex code. Whoever came up with that, my hat is off to you. -Greg =20 --------------enigE5C41C1C5455FCE08F8F1D06 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkllcucACgkQlOSOBdgZUxmurgCfd+54STTrqi0rNGoru3oWRczk gDcAoIISQ5Lae9KIgZzG37aQBMnuVpRP =lod+ -----END PGP SIGNATURE----- --------------enigE5C41C1C5455FCE08F8F1D06-- -- 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/