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

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

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] atomic counters larger than 24 bits?
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Thu, 26 Mar 2009 19:38:13 +0000 (GMT)
Delivery-date: Thu, 26 Mar 2009 12:39:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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".

First, are the comments true in the xen implementation?
(I don't see any code that restricts them to anything less
than "int".)  If they ARE limited to 24 bits, what's the
recommended approach for larger atomic operations... or
do I just need to always use a lock?

Thanks,
Dan

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

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