From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures Date: Thu, 16 Aug 2007 11:48:23 -0700 (PDT) Message-ID: References: <18115.35524.56393.347841@cargo.ozlabs.ibm.com> <20070816003948.GY9645@linux.vnet.ibm.com> <20070816005348.GA9645@linux.vnet.ibm.com> <20070816011414.GC9645@linux.vnet.ibm.com> <20070816020851.GA30809@gondor.apana.org.au> <18115.49946.522011.832468@cargo.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Herbert Xu , Satyam Sharma , "Paul E. McKenney" , Stefan Richter , Chris Snook , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, davem@davemloft.net, schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, cfriesen@nortel.com, zlynx@acm.org, rpjday@mindspring.com, jesper.juhl@gmail.com, segher@kernel.crashing.org To: Paul Mackerras Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:47726 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756984AbXHPSs2 (ORCPT ); Thu, 16 Aug 2007 14:48:28 -0400 In-Reply-To: <18115.49946.522011.832468@cargo.ozlabs.ibm.com> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, 16 Aug 2007, Paul Mackerras wrote: > > It seems that there could be a lot of places where atomic_t is used in > a non-atomic fashion, and that those uses are either buggy, or there > is some lock held at the time which guarantees that other CPUs aren't > changing the value. In both cases there is no point in using > atomic_t; we might as well just use an ordinary int. The point of atomic_t is to do atomic *changes* to the variable.