From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Kenneth W" Date: Fri, 31 Mar 2006 02:45:11 +0000 Subject: RE: Synchronizing Bit operations V2 Message-Id: <200603310244.k2V2iQg28203@unix-os.sc.intel.com> List-Id: In-Reply-To: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: 'Christoph Lameter' Cc: Nick Piggin , Zoltan Menyhart , "Boehm, Hans" , "Grundler, Grant G" , akpm@osdl.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org Christoph Lameter wrote on Thursday, March 30, 2006 6:38 PM > > > Neither one is correct because there will always be one combination of > > > clear_bit with these macros that does not generate the required memory > > > barrier. > > > > Can you give an example? Which combination? > > For Option(1) > > smp_mb__before_clear_bit() > clear_bit(...)( Sorry, you totally lost me. It could me I'm extremely slow today. For option (1), on ia64, clear_bit has release semantic already. The comb of __before_clear_bit + clear_bit provides the required ordering. Did I miss something? By the way, we are talking about detail implementation on one specific architecture. Not some generic concept that clear_bit has no ordering stuff in there. - Ken