Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 11 Dec 2002 16:04:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 11 Dec 2002 16:04:47 -0500 Received: from dp.samba.org ([66.70.73.150]:64930 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id ; Wed, 11 Dec 2002 16:04:46 -0500 From: Paul Mackerras MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15863.43576.467511.255317@argo.ozlabs.ibm.com> Date: Thu, 12 Dec 2002 08:12:24 +1100 To: Kevin Corry Cc: Denis Vlasenko , Joe Thornber , Kernel Mailing List , lvm-devel@sistina.com Subject: Re: [PATCH] dm.c - device-mapper I/O path fixes In-Reply-To: <02121108060005.29515@boiler> References: <02121016034706.02220@boiler> <20021211141820.GA21461@reti> <200212111435.gBBEYWa06788@Port.imtp.ilyichevsk.odessa.ua> <02121108060005.29515@boiler> X-Mailer: VM 7.07 under Emacs 20.7.2 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 922 Lines: 22 Kevin Corry writes: > Storing an int is *not* atomic unless it is declared as atomic_t and you use > the appropriate macros (see include/asm-*/atomic.h). Remember, we are talking > about a field in a data structure that can be accessed from multiple threads > on multiple CPUs. As a practical matter, I believe that storing an int to an int-aligned address _is_ actually atomic on any CPU that can run Linux. The PowerPC architecture spec requires that single-word (i.e. 32-bit) aligned stores are atomic, for instance, and I think that would be the case on any other sane architecture as well. The language lawyers would probably agree with you, though. Regards, Paul. - 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/