Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753770AbZALB5b (ORCPT ); Sun, 11 Jan 2009 20:57:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752069AbZALB5T (ORCPT ); Sun, 11 Jan 2009 20:57:19 -0500 Received: from mail2.shareable.org ([80.68.89.115]:44135 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbZALB5S (ORCPT ); Sun, 11 Jan 2009 20:57:18 -0500 Date: Mon, 12 Jan 2009 01:56:20 +0000 From: Jamie Lokier To: Ingo Molnar Cc: Linus Torvalds , "H. Peter Anvin" , Harvey Harrison , Andi Kleen , Chris Mason , Peter Zijlstra , Steven Rostedt , paulmck@linux.vnet.ibm.com, Gregory Haskins , Matthew Wilcox , Andrew Morton , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich , Heiko Carstens Subject: Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning Message-ID: <20090112015620.GA6428@shareable.org> References: <1231537320.5726.2.camel@brick> <20090109231227.GA25070@elte.hu> <20090110010125.GA31031@elte.hu> <1231549697.5700.7.camel@brick> <49682C05.7030407@zytor.com> <20090111005458.GA5363@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090111005458.GA5363@elte.hu> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 717 Lines: 19 Ingo Molnar wrote: > If it's used once in a single .c file it should be inlined even if > it's large. As Linus has pointed out, because of GCC not sharing stack among different inlined functions, the above is surprisingly not true. In kernel it's a problem due to raw stack usage. In userspace apps (where stack used is larger), inlining single-call functions could, paradoxically, run slower due to increased stack dcache pressure for some larger functions. -- Jamie -- 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/