Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097AbWCaAw2 (ORCPT ); Thu, 30 Mar 2006 19:52:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751080AbWCaAw2 (ORCPT ); Thu, 30 Mar 2006 19:52:28 -0500 Received: from mga03.intel.com ([143.182.124.21]:20308 "EHLO azsmga101-1.ch.intel.com") by vger.kernel.org with ESMTP id S1751096AbWCaAw1 (ORCPT ); Thu, 30 Mar 2006 19:52:27 -0500 X-IronPort-AV: i="4.03,148,1141632000"; d="scan'208"; a="17145927:sNHT25605188" Message-Id: <200603310052.k2V0qQg26856@unix-os.sc.intel.com> From: "Chen, Kenneth W" To: "'Christoph Lameter'" Cc: "Nick Piggin" , "Zoltan Menyhart" , "Boehm, Hans" , "Grundler, Grant G" , , , Subject: RE: Synchronizing Bit operations V2 Date: Thu, 30 Mar 2006 16:53:11 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcZUXAG21lXprQUaTYu04PO/eGNctwAARc9g In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1085 Lines: 23 Christoph Lameter wrote on Thursday, March 30, 2006 4:43 PM > > > Note that the current semantics for bitops IA64 are broken. Both > > > smp_mb__after/before_clear_bit are now set to full memory barriers > > > to compensate > > > > Why you say that? clear_bit has built-in acq or rel semantic depends > > on how you define it. I think only one of smp_mb__after/before need to > > be smp_mb? > > clear_bit has no barrier semantics just acquire. Therefore both smp_mb_* > need to be barriers or they need to add some form of "release". We are talking about arch specific implementation of clear_bit and smp_mb_*. Yes, for generic code, clear_bit has no implication of memory ordering, but for arch specific code, one should optimize those three functions with the architecture knowledge of exactly what's happening under the hood. - Ken - 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/