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] get_page put_page cmpxchg problem?

To: "King, Steven R" <steven.r.king@xxxxxxxxx>
Subject: Re: [Xen-devel] get_page put_page cmpxchg problem?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 21 Jul 2005 22:36:30 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 21 Jul 2005 21:30:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <44BDAFB888F59F408FAE3CC35AB4704101E0F465@orsmsx409>
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>
References: <44BDAFB888F59F408FAE3CC35AB4704101E0F465@orsmsx409>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 21 Jul 2005, at 21:59, King, Steven R wrote:

Hi Folks,
In -unstable (I haven't updated in a few days), I'm investigating a problem in which revalidate_l1() fails because get_page() fails due to a count_info of 0.  While that problem is still hanging over me, I did notice that get_page() in include/asm-x86/mm.h does a 64-bit cmpxchg while put_page() only does a 32-bit cmpxchg.  Seemed odd to me and possibly related to my bug.    I'm running on a 32-bit machine without shadow tables.
 
Can anyone offer an explanation?

In put_page() we can be sure the refcnt is non-zero and so the domain ptr will not change under our feet. Therefore there's no need to include it in the cmpxchg when we update the reference count.

 -- Keir


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

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