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>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: fix domain cleanup
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 28 Oct 2008 09:36:36 +0000
Cc:
Delivery-date: Tue, 28 Oct 2008 02:37:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4906E8C0.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: Ack44Kug6nDi2KTTEd2LtwAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH] x86: fix domain cleanup
User-agent: Microsoft-Entourage/11.4.0.080122
On 28/10/08 09:26, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> But how would one distinguish the two (or three at present, due to
> DOMAIN_DESTRUCT_AVOID_RECURSION) cases?

I'm not sure. Do they need to be distinguished?

> Also, where is the
> matching put_page() for the type refcount decrement in free_page_type()
> in the circular case (in  free_page_type(A) -> put_page_and_type(B) ->
> free_page_type(B) -> put_page_and_type(A) we'll have the type refcount
> decremented twice, but the page refcount just once)? Or is this decrement
> invalid in that case (I don't think it is, as get_lN_linear_pagetable()
> increments it along with keeping the page reference it obtained in the
> success case, but if it is, it again poses the question of how to recognize
> that case)?

Ah, looks like it's been broken since the preemptible page_type patch went
in. Perhaps the tail of free_page_type() should go into __put_page_type(),
as it's not needed by the call site in relinquish_memory(): the caller
doesn't really hold a type reference to be dropped; and the logic for being
preempted doesn't apply since relinquish_memory() requests no preemption.

 -- Keir



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