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

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] question about atomic get_page
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Sat, 11 Jun 2005 13:55:41 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 11 Jun 2005 05:54:56 +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: AcVuSAD/Vn9GwX9tSnuKf/JtATW9wAAAD4/A
Thread-topic: [Xen-devel] question about atomic get_page
>-----Original Message-----
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: Saturday, June 11, 2005 1:36 PM
>To: Tian, Kevin
>
>
>On 11 Jun 2005, at 05:08, Tian, Kevin wrote:
>
>> 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?
>
>There'd be nothing to stop the domain pointer changing while you modify
>the reference count. On x86/64 we 'pickle' the domain pointer into a
>32-bit field by simply masking off the high bits. Do you really need
>the 64-bit range? Checking the domain field after modifying the
>reference count would probably be okay really, it's just that a domain
>could get a handle on another domain's page for a short while without
>that other domain's permission.
>
>  -- Keir

Got it. And one prerequisite for this trick is that xen heap always
stays in area < 4G machine memory, or else 'unpickle' will go weird
then. :) Currently seems xen heap can satisfy it on all archs, including
ia64. Then I will also change that field back to 32bit and everything
will work same as x86.

Thanks a lot,
Kevin

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

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