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] question about atomic get_page

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] question about atomic get_page
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Sat, 11 Jun 2005 12:08:08 +0800
Delivery-date: Sat, 11 Jun 2005 04:07:22 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVuOyz+uEA4MaOYS9iPTmdOqdgxFA==
Thread-topic: question about atomic get_page
Now get_page on x86 is implemented to atomic exchange both _domain and
count_info simultaneously. Cmpxchg8b is used to cover two fields because
they are all 32bit width.

However on ia64 where _domain is 64bit, hard to use single instruction
to cover two fields. Yes, there's workaround to solve that, like adding
spinlock with some overhead. But I'd like to know the reason why _domain
and count_info should be operated together. Is there any case that
ownership changes just after checking ownership and before modifying
count_info?

Thanks,
Kevin 

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

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