Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Jan 2002 16:46:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Jan 2002 16:46:34 -0500 Received: from samba.sourceforge.net ([198.186.203.85]:14860 "HELO lists.samba.org") by vger.kernel.org with SMTP id ; Wed, 16 Jan 2002 16:46:20 -0500 From: Paul Mackerras MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15429.61767.644150.186995@argo.ozlabs.ibm.com> Date: Thu, 17 Jan 2002 08:31:51 +1100 (EST) To: Cc: Rusty Russell , Ingo Molnar , linux-kernel , Linus Torvalds Subject: Re: [PATCH] I3 sched tweaks... In-Reply-To: In-Reply-To: X-Mailer: VM 6.75 under Emacs 20.7.2 Reply-To: paulus@samba.org Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Ingo Molnar writes: > It's > slightly cheaper to pass an already existing (calculated) 'current' > pointer over to another function, instead of calculating it once more in > that function. On x86 that's true; many other architectures - alpha, ia64, m68k, mips, mips64, parisc, ppc, ppc64, sparc, sparc64 - keep current in a register already and thus it is slightly more expensive to pass it as a parameter instead of just using current in the function. Either way surely the cost is tiny, and the maintainability considerations should prevail. Having a function which takes a task_struct * parameter which _has_ to be current sounds to me like an invitation for somebody to get it wrong down the track. Paul. - 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/