Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932496AbVL1HtR (ORCPT ); Wed, 28 Dec 2005 02:49:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932497AbVL1HtR (ORCPT ); Wed, 28 Dec 2005 02:49:17 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:21907 "EHLO mx2.mail.elte.hu") by vger.kernel.org with ESMTP id S932496AbVL1HtR (ORCPT ); Wed, 28 Dec 2005 02:49:17 -0500 Date: Wed, 28 Dec 2005 08:48:57 +0100 From: Ingo Molnar To: Nicolas Pitre Cc: lkml , Arjan van de Ven , Russell King Subject: Re: [patch 1/3] mutex subsystem: trylock Message-ID: <20051228074857.GA4600@elte.hu> References: <20051223161649.GA26830@elte.hu> <20051227115129.GB23587@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-ELTE-SpamScore: -1.9 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.9 required=5.9 tests=ALL_TRUSTED,AWL autolearn=no SpamAssassin version=3.0.3 -2.8 ALL_TRUSTED Did not pass through any untrusted hosts 1.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 Content-Length: 683 Lines: 19 * Nicolas Pitre wrote: > > here we go to great trouble trying to avoid the 'slowpath', while we > > unconditionally force the next unlock into the slowpath! So we have > > not won anything. (on a cycle count basis it's probably even a net > > loss) > > I disagree. [...elaborate analysis of the code ...] you are right, it should work fine, and should be optimal. I'll add your xchg variant to mutex-xchg.h. Ingo - 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/