From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750890AbWABRDo (ORCPT ); Mon, 2 Jan 2006 12:03:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750891AbWABRDo (ORCPT ); Mon, 2 Jan 2006 12:03:44 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:64745 "EHLO mx3.mail.elte.hu") by vger.kernel.org with ESMTP id S1750888AbWABRDn (ORCPT ); Mon, 2 Jan 2006 12:03:43 -0500 Date: Mon, 2 Jan 2006 18:03:26 +0100 From: Ingo Molnar To: Andi Kleen Cc: lkml , Linus Torvalds , Andrew Morton , Arjan van de Ven , Nicolas Pitre , Jes Sorensen , Al Viro , Oleg Nesterov , David Howells , Alan Cox , Christoph Hellwig , Russell King Subject: Re: [patch 05/19] mutex subsystem, add include/asm-x86_64/mutex.h Message-ID: <20060102170326.GA5593@elte.hu> References: <20060102163354.GF31501@elte.hu> <20060102164605.GB7222@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060102164605.GB7222@wotan.suse.de> User-Agent: Mutt/1.4.2.1i X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=AWL autolearn=no SpamAssassin version=3.0.3 0.0 AWL AWL: From: address is in the auto white-list X-ELTE-VirusStatus: clean Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Andi Kleen wrote: > > + : "rax", "rsi", "rdx", "rcx", \ > > + "r8", "r9", "r10", "r11", "memory"); \ > > I think it would be still better if you used the stubs in > arch/x86_64/lib/thunk.S and not clobber all the registers. While it > won't make that much difference for the out of line mutexes it will > generate better code for inline mutexes, and if someone ever decides > they're a good idea the code will be ready. i didnt want to add it to thunk.S because right now it would cause an unnecessary slowdown for the slowpath, by quite a number of instructions: due to the indiscriminate register-saving/restoring done in thunk.S. even though it's a "slow path" relative to the fastpath, we shouldnt slow it down unnecessarily. So if someone wants to play with more inlining later on, this has to be done in context of that effort. Ingo