All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Gorm Hansen <jacobg@diku.dk>
To: Peri Hankey <mpah@thegreen.co.uk>
Cc: urmk@reason.marist.edu, Rik van Riel <riel@redhat.com>,
	xen-devel@lists.sourceforge.net
Subject: Re: copy on write memory
Date: Fri, 19 Nov 2004 11:35:17 +0100	[thread overview]
Message-ID: <419DCC65.4010704@diku.dk> (raw)
In-Reply-To: <419CE6DF.10901@thegreen.co.uk>

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

  reply	other threads:[~2004-11-19 10:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-15 22:01 copy on write memory Peri Hankey
2004-11-16  0:35 ` Rik van Riel
2004-11-16  9:44   ` Peri Hankey
2004-11-16  9:51     ` Peri Hankey
2004-11-16 15:27     ` urmk
2004-11-16 16:17       ` Mark A. Williamson
2004-11-18 16:56       ` Peri Hankey
2004-11-18 17:11         ` urmk
2004-11-18 17:25           ` Keir Fraser
2004-11-18 18:41             ` Kip Macy
2004-11-18 18:55               ` Keir Fraser
2004-11-18 19:16                 ` Kip Macy
2004-11-18 18:15           ` Peri Hankey
2004-11-19 10:35             ` Jacob Gorm Hansen [this message]
2004-11-19 10:59               ` Keir Fraser
2004-11-19 12:02                 ` Jacob Gorm Hansen
2004-11-19 14:50                   ` Keir Fraser
2004-11-22 12:42                     ` Jacob Gorm Hansen
2004-11-25 15:01                       ` of cows and clones: creating domains as clones of saved state Peri Hankey
2004-11-25 21:19                         ` Keir Fraser
2004-11-25 22:13                           ` Peri Hankey
2004-11-25 22:36                             ` Keir Fraser
2004-11-25 22:37                             ` Ian Pratt
2004-11-16 18:10     ` copy on write memory Adam Heath
2004-11-16 18:09   ` Adam Heath
2004-11-16 18:39     ` Matt Ayres

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=419DCC65.4010704@diku.dk \
    --to=jacobg@diku.dk \
    --cc=mpah@thegreen.co.uk \
    --cc=riel@redhat.com \
    --cc=urmk@reason.marist.edu \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.