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 to allow many more xenU domains per

To: Michael Vrable <mvrable@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Copy-on-write memory to allow many more xenU domains per machine
From: Jacob Gorm Hansen <jacob@xxxxxxxx>
Date: Tue, 02 Nov 2004 21:55:42 +0100
Cc: Xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 02 Nov 2004 21:05:46 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <20041025153810.A18297@xxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <d2ab765004100801593b60c876@xxxxxxxxxxxxxx> <E1CFqmU-00052h-00@xxxxxxxxxxxxxxxxx> <20041012115013.B16621@xxxxxxxxxxx> <417CEDA6.6010209@xxxxxxxxxxxxxx> <20041025153810.A18297@xxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.8 (X11/20041012)
 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

<Prev in Thread] Current Thread [Next in Thread>