From: "Jan Beulich" Subject: Re: [PATCH] x86: fix domain cleanup Date: Tue, 28 Oct 2008 12:47:05 +0000 Message-ID: <490717D9.76E4.0078.0@novell.com> References: <490708D4.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 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