WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] atomic counters larger than 24 bits?

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] atomic counters larger than 24 bits?
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Fri, 27 Mar 2009 00:26:27 +0100
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 26 Mar 2009 16:26:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <aa4cfdc9-285e-4ff0-8b51-c3de728135cd@default>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <aa4cfdc9-285e-4ff0-8b51-c3de728135cd@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Dan Magenheimer, le Thu 26 Mar 2009 19:38:13 +0000, a écrit :
> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>