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 11:43:00 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 28 Oct 2008 04:42:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C52CA4D0.28760%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: <C52C9EBD.2874D%keir.fraser@xxxxxxxxxxxxx> <C52CA4D0.28760%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> 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.

>Shouldn't free_domheap_pages() do cleanup for partially validated pages?

I don't think that would be the right place. This should be naturally done
in the normal code paths, by ensuring (which I think we do) to always
check for PGT_partial along with PGT_validated.

>Is it possible or necessary to tell the difference between a page that is
>partially alloc_page_type()d versus one which is partially
>free_page_type()d? (e.g., are the reference counts left in different states
>in each case, and does that matter?)

I think it's unnecessary to distinguish these, as long as the page's state
doesn't differ when getting its PGT_partial flag set either way. And I
believe that state is consistent at present (apart from the missing page
reference, which however is consistently missing in both cases).

Jan


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