[XenPPC] Re: [Xen-devel] What actually destroys a domain?

2006-09-13 Thread Keir Fraser



On 12/9/06 14:05, Jimi Xenidis [EMAIL PROTECTED] wrote:

 
 Xenconsoled's mapping of the console page should keep the domain
 alive.
 
 hmm, I'm having trouble associating the mapping and a refcount of
 some sort somewhere, any pointers?

See share_xen_page_with_guest() in arch/x86/mm.c. The refcnt is dropped when
xenheap_pages field reduces to zero in
common/page_alloc.c:free_domheap_pages().

 -- Keir



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Re: [Xen-devel] What actually destroys a domain?

2006-09-13 Thread Jimi Xenidis


On Sep 13, 2006, at 5:23 AM, Keir Fraser wrote:





On 12/9/06 14:05, Jimi Xenidis [EMAIL PROTECTED] wrote:



Xenconsoled's mapping of the console page should keep the domain
alive.


hmm, I'm having trouble associating the mapping and a refcount of
some sort somewhere, any pointers?


See share_xen_page_with_guest() in arch/x86/mm.c. The refcnt is  
dropped when

xenheap_pages field reduces to zero in
common/page_alloc.c:free_domheap_pages().


Hmm.. but the console page is a domain page, no?
After looking at more code I convinced myself that a page not owned  
by the domain but owned by another is foreign.


-JX



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Re: [Xen-devel] What actually destroys a domain?

2006-09-13 Thread Jimi Xenidis


On Sep 13, 2006, at 8:15 AM, Keir Fraser wrote:





On 13/9/06 10:23, Keir Fraser [EMAIL PROTECTED] wrote:



Xenconsoled's mapping of the console page should keep the domain
alive.


hmm, I'm having trouble associating the mapping and a refcount of
some sort somewhere, any pointers?


See share_xen_page_with_guest() in arch/x86/mm.c. The refcnt is  
dropped when

xenheap_pages field reduces to zero in
common/page_alloc.c:free_domheap_pages().


Sorry, I'm talking rubbish here. As you say, the relevant code is  
actually
in the foreign mapping paths (e.g., in arch/x86/mm.c). Those paths  
do a
get_page() on the foreign page. This stops it being removed from  
the domU
page list. A non-empty page list holds a reference on the domU. So  
the domU

will not die until that foreign mapping is destroyed.


Whew!

-JX

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Re: [Xen-devel] What actually destroys a domain?

2006-09-12 Thread Hollis Blanchard
On Tue, 2006-09-12 at 11:16 -0400, Jimi Xenidis wrote:
 On Sep 12, 2006, at 9:05 AM, Jimi Xenidis wrote:
 
 
  On Sep 12, 2006, at 3:38 AM, Keir Fraser wrote:
 
 
  Xenconsoled's mapping of the console page should keep the domain  
  alive.
 
  hmm, I'm having trouble associating the mapping and a refcount of  
  some sort somewhere, any pointers?
 
 I see it now, its in the foreign domain logic. I thought it would  
 be a page count not a dom count.

Actually, why *isn't* it increasing the page reference count? That would
keep the page attached to the domain, which would mean d-tot_pages
would stay non-zero, so that would indicate that the domain isn't ready
to be killed yet...

-- 
Hollis Blanchard
IBM Linux Technology Center


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel