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] copy on write memory

Peri Hankey wrote:

My idea is to use a memory-privileged xenU domain as a page-table manager for a group of client domains. It would have to know about the memory/page/block usage of every process in each of its clients as if they were all running within it. But it would never operate as the actual kernel for any of these processes. For those purposes each process would operate under the supervision of a memory-client domain that has its own kernel address space.

I haven't at present got the intimate knowledge of memory management traffic between xen, xen0 and xenU domains that I would need to see whether or not this idea has any legs. But I am very interested to know what anyone thinks. No doubt the best answer is to go and study the code.

I think the main point distinguishing the design of Xen from that of older microkernels (such as L4), is that there is no memory management traffic between domains, and it should probably stay that way to retain the good performance and performance isolation that Xen has to offer.

I would like to re-plug the idea I proposed earlier, on the topic of sharing read-only pages across domains:

Create a new variant of the HYPERVISOR_update_va_mapping (or of the batched variant, or both), lets call it HYPERVISOR_make_ro_and_share.

When Xen gets this hypercall, it does the following:

- Turn the mapping into a read-only mapping.

- Look up the contents of the machine page in the mapping in a machine-global hash table or other suitable type of associative data strucure.

- If there is a match, make the user's mapping point to the matching page. Also increase a reference/sharing count of the matching page.

- If there is no match, insert the user's page into the hash table.

- Revoke the user's ownership of the old page.

If the mapping is write-accessed inside the user's domain, the user will be responsible for CoWing the page into a newly allocated one. As an optimisation, one of the AVL bits can be used for tracking this type of fault. When you update the mapping, Xen will decrease the reference/sharing count of the previously shared page, and if the refcount reaches zero free the page, and remove it from the hash table.

Jacob


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel