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: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: fix domain cleanup
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 28 Oct 2008 12:06:07 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 28 Oct 2008 05:06:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <490708D4.76E4.0078.0@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack49Y7CzW7FAKToEd2ghgAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] x86: fix domain cleanup
User-agent: Microsoft-Entourage/11.4.0.080122
On 28/10/08 11:43, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

>>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 28.10.08 12:15 >>>
>> Actually I'm not sure how PGT_partial reference counting works either. Do
>> such pages hold a general reference count? It appears not, so I don't see
>> why for example we couldn't have the put_page() in
>> get_page_and_type_from_pagenr() cause free_domheap_pages() and then BUG_ON()
>> the fact that the type count is non-zero (because it is partially
>> validated).
> 
> Correct, that's the second bug I referred to. I think that we have to retain
> a general reference for a partially validated page.

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?

Basically messing with the general reference count seems pretty dangerous to
me. I would have been inclined to put some destruction in
free_domheap_pages() (although of course then that function also becomes
potentially preemptible in future!).

 -- Keir



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