[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: fix domain cleanup


  • To: Jan Beulich <jbeulich@xxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Ack49Y7CzW7FAKToEd2ghgAX8io7RQ==
  • Thread-topic: [Xen-devel] [PATCH] x86: fix domain cleanup

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.