Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261254AbVARHJN (ORCPT ); Tue, 18 Jan 2005 02:09:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261252AbVARHJN (ORCPT ); Tue, 18 Jan 2005 02:09:13 -0500 Received: from pimout4-ext.prodigy.net ([207.115.63.98]:32903 "EHLO pimout4-ext.prodigy.net") by vger.kernel.org with ESMTP id S261250AbVARHJJ (ORCPT ); Tue, 18 Jan 2005 02:09:09 -0500 Date: Mon, 17 Jan 2005 23:08:52 -0800 From: Chris Wedgwood To: Ingo Molnar , Andrew Morton , torvalds@osdl.org, benh@kernel.crashing.org, linux-kernel@vger.kernel.org, Ia64 Linux Subject: Re: Horrible regression with -CURRENT from "Don't busy-lock-loop in preemptable spinlocks" patch Message-ID: <20050118070852.GA26049@taniwha.stupidest.org> References: <20050117055044.GA3514@taniwha.stupidest.org> <20050116230922.7274f9a2.akpm@osdl.org> <20050117143301.GA10341@elte.hu> <20050118014752.GA14709@cse.unsw.EDU.AU> <20050118042858.GD14709@cse.unsw.EDU.AU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050118042858.GD14709@cse.unsw.EDU.AU> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 727 Lines: 22 On Tue, Jan 18, 2005 at 03:28:58PM +1100, Darren Williams wrote: > On top of Ingo's patch I attempt a solution that failed: > +#define read_is_locked(x) (*(volatile int *) (x) > 0) > +#define write_is_locked(x) (*(volatile int *) (x) < 0) how about something like: #define read_is_locked(x) (*(volatile int *) (x) != 0) #define write_is_locked(x) (*(volatile int *) (x) & (1<<31)) I'm not masking the write-bit for read_is_locked here, I'm not sure is we should? --cw - 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/