From: Samuel Thibault Subject: Re: atomic counters larger than 24 bits? Date: Fri, 27 Mar 2009 00:26:27 +0100 Message-ID: <20090326232627.GG5458@const.famille.thibault.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org Dan Magenheimer, le Thu 26 Mar 2009 19:38:13 +0000, a =E9crit : > In tmem, I have some counters that I need to keep coherent, > preferably without a lock, so I'm using atomic_inc/dec etc. > However the comments in include/asm-x86/atomic.h say repeatedly > that the "useful range of an atomic_t is only 24 bits". IIRC the historical reason for this is that some Linux architectures weren't providing more. The x86 implementation does support signed 32 bits. I believe the ia64 implementation does too. Samuel