From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning Date: Mon, 12 Jan 2009 01:56:20 +0000 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 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 To: Ingo Molnar Return-path: 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 Content-Disposition: inline In-Reply-To: <20090111005458.GA5363@elte.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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