Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266386AbUFZTNX (ORCPT ); Sat, 26 Jun 2004 15:13:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266387AbUFZTNX (ORCPT ); Sat, 26 Jun 2004 15:13:23 -0400 Received: from twilight.ucw.cz ([81.30.235.3]:59522 "EHLO midnight.ucw.cz") by vger.kernel.org with ESMTP id S266386AbUFZTNU (ORCPT ); Sat, 26 Jun 2004 15:13:20 -0400 Date: Sat, 26 Jun 2004 21:13:20 +0200 From: Vojtech Pavlik To: Linus Torvalds Cc: James Bottomley , Andrew Morton , Paul Jackson , PARISC list , Linux Kernel Subject: Re: [PATCH] Fix the cpumask rewrite Message-ID: <20040626191320.GA3850@ucw.cz> References: <1088266111.1943.15.camel@mulgrave> <1088268405.1942.25.camel@mulgrave> <1088270298.1942.40.camel@mulgrave> <20040626182820.GA3723@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 34 On Sat, Jun 26, 2004 at 11:54:24AM -0700, Linus Torvalds wrote: > On Sat, 26 Jun 2004, Vojtech Pavlik wrote: > > > > At least input pretty much relies on the fact that bitops don't need > > locking and act as memory barriers. > > Well, plain test_bit() has always been more relaxed than the others, and > has never implied a memory barrier. Only the "test_and_set/clear()" things > imply memory barriers. Ouch. I'll have to revisit some code then. > What we _could_ do (without changing any existing rules) is to add a > "__test_bit()" that is the relaxed version that doesn't do any of the > volatile etc. That would match the "__" versions of the other bit > operations. > > Then people who know that they use the bits without any volatility issues > can use that one, and let the compiler optimize more. > > Hmm? That makes a lot of sense to me, as we already have the __ variants for most of the other bitops already. -- Vojtech Pavlik SuSE Labs, SuSE CR - 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/