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] [PATCH] x86: fix domain cleanup

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: fix domain cleanup
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 28 Oct 2008 12:47:05 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 28 Oct 2008 05:46:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C52CB0AF.2876C%keir.fraser@xxxxxxxxxxxxx>
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>
References: <490708D4.76E4.0078.0@xxxxxxxxxx> <C52CB0AF.2876C%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 28.10.08 13:06 >>>
>And who will ultimately destroy that reference if we e.g., xm destroy a
>guest? Are you hoping the circular-reference destruction logic will deal
>with this case also? Seems to me there would be a difference between
>preempted get_page_type() and preempted put_page_type() here -- in the
>latter case there is still a holder of the outstanding general reference
>count (the holder who tried to do the put_page_type() which got preempted)
>whereas in the former case the general reference count is not really held by
>anyone and so relinquish_memory() would indeed have to dispose of it?

If we set the simple rule of "Whoever sets PGT_partial must make sure
he leaves an extra ref pending, and whoever clears PGT_partial must drop
that reference", we should be fine in my opinion.

Also, a preempted get_page_and_type_from_pagenr() drops the general
reference, and a preempted put_page_and_type() retains it, so to me
the page state seems to be consistent between the two.

Jan


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