From: Keir Fraser Subject: Re: [PATCH] x86: fix domain cleanup Date: Tue, 28 Oct 2008 10:25:25 +0000 Message-ID: References: <4906F204.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4906F204.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 28/10/08 10:05, "Jan Beulich" wrote: >> 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. > > It doesn't at present, but it should (in favor of > DOMAIN_DESTRUCT_AVOID_RECURSION), > including the put_page_and_type() earlier in that function. But of course, > it may still turn out that cleaning up after preemption here must be handled > differently from the __put_page_type() case. I'll give moving that part > (and removing the put_page() added yesterday) a try. __put_page_type() is already a complex function actually, so let's define a __put_final_page_type() containing a call to free_page_type() plus the current tail of free_page_type(). __put_page_type() can call that; relinquish memory can call free_page_type() directly. -- Keir