Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756058AbZAIE7q (ORCPT ); Thu, 8 Jan 2009 23:59:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753377AbZAIE7d (ORCPT ); Thu, 8 Jan 2009 23:59:33 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:35955 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751734AbZAIE7c (ORCPT ); Thu, 8 Jan 2009 23:59:32 -0500 Date: Thu, 08 Jan 2009 20:59:33 -0800 (PST) Message-Id: <20090108.205933.96892305.davem@davemloft.net> To: torvalds@linux-foundation.org Cc: hpa@zytor.com, mingo@elte.hu, chris.mason@oracle.com, peterz@infradead.org, rostedt@goodmis.org, paulmck@linux.vnet.ibm.com, ghaskins@novell.com, matthew@wil.cx, andi@firstfloor.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, tglx@linutronix.de, npiggin@suse.de, pmorreale@novell.com, SDietrich@novell.com Subject: Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning From: David Miller In-Reply-To: References: <20090108183306.GA22916@elte.hu> <496648C7.5050700@zytor.com> X-Mailer: Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1008 Lines: 22 From: Linus Torvalds Date: Thu, 8 Jan 2009 19:46:30 -0800 (PST) > First off, gcc _does_ have a perfectly fine notion of how heavy-weight an > "asm" statement is: just count it as a single instruction (and count the > argument setup cost that gcc _can_ estimate). Actually, at least at one point, it counted the number of newline characters in the assembly string to estimate how many instructions are contained inside. It actually needs to know exaclty how many instructions are in there, to emit proper far branches and stuff like that, for some cpus. Since they never added an (optional) way to actually tell the compiler this critical piece of information, so I guess the newline hack is the best they could come up with. -- 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/