From: Keir Fraser Subject: Re: question about atomic get_page Date: Sat, 11 Jun 2005 06:36:01 +0100 Message-ID: <58e129494ec5b79edf2ce4eccdbdbbac@cl.cam.ac.uk> References: <571ACEFD467F7749BC50E0A98C17CDD806FE0571@pdsmsx403> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD806FE0571@pdsmsx403> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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