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

Re: [Xen-devel] Copy-on-write memory to allow many more xenU domains per machine



 Michael Vrable wrote:

> My current status: I've been working first on using shadow page tables
> to hide the actual machine addresses of pages from domains.  I'm only
> partway through doing that, and may yet go back and change how I'm
> approaching that (I'm still learning bits about how Xen works as I'm
> going through to modify the code; I'm also thinking now of changes that
> would be good to make copy-on-write easier later).  I'm trying to write
> up some of my design thoughts; if anyone here is interested or would
> like to offer comments, I can post that here.
>
> David mentioned implementing a clone() for VMs; that is something that
> I'd also like to try out.  (It should be possible to test that after
> only the first step of hiding machine addresses, before copy-on-write is
> implemented, though copy-on-write will make it efficient.

What about having a special variant of the pte-update operation, which takes as input a pointer to a pte-entry, and will change that entry into a read-only mapping of the same page contents, though perhaps with a different frame number in the pte.

Then Xen can lookup the page contents in a global hashtable or binary tree (which might be faster, because you don't need to scan the entire page contents unless you have a match), and see if there is a matching copy somewhere. If there is, it can decrease a refcount for the page provided by the user, change the mapping to point to the matching page, and free the user's page if the refcount has reached zero.

In this way, domains become responsible for sharing memory across the system, but only pages that are likely candidates for sharing (kernel text, user process text) are actually scanned, and you don't get the overhead of shadow page tables.

Jacob


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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