RE: [Xen-devel] Memory de-duplication
The biggest challenge will be that the hypervisor does not
contain any device drivers. This will cause two major problems:
When a userland application does a “read”, currently
the kernel is responsible for fetching the data from the disk. Xen can’t
do that without device drivers. The same is true for “write”.
A shared swap area requires disk drivers so the hypervisor can’t
You could build your sharing code in dom0 but that is very
similar to Satori.
From: Kaustubh Kabra
Sent: Sunday, August 29, 2010 10:54 PM
Cc: Dan Magenheimer; Konrad Wilk
Subject: Re: [Xen-devel] Memory de-duplication
idea of implementation suggests to bring the memory manager from the kernel of
the Dom U s to the hypervisor level and directly map the memory management
related system calls to the hypercalls. Then allocate pages in the
main memory after performing de-duplication and return the address. So, the aim
is to have a single memory manager running at hypervisor level.
When the RAM becomes full a shared swap area
will be used further reducing the need for an explicit swap within each DomU
hence saving significant amount of disk space. Will such an implementation be
useful? What are the expected challenges?
We were thinking of implementing such a idea as our final year project.
On Fri, Aug 27, 2010 at 10:43 PM, Kaustubh Kabra <kaustubhwise@xxxxxxxxx> wrote:
Yes, I have been thinking of implementing common-page sharing for
multiple guest OSes for Xen. This will be similar to the way KVM
benefits because of the KSM feature in the Linux kernel.
I found your patch for sharing ephemeral pages in the same tmem pool while
searching further on the same topic. As I understand it the ephemeral
are the pages that are read-only, i.e. txt section of executables etc. Is this
Now that this is in place, I was thinking about extending this further
to all the pages in the Guest OS's memory and use COW for read-write
pages. I have started reading up the tmem architecture document and
also your patch to have a better understanding of the system. Once I
have digested this, I'll come up with a proposal towards the same.
Do you have any thoughts on the concept / anticipated roadblocks ?
On Thu, Aug 26, 2010 at 7:49 PM, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Hello Kaustubh --
I'm sorry I didn't reply to your earlier direct email.
Tmem internals documentation can be found in the Xen
source tree under docs/misc... here is the document:
There is a brief discussion about page deduplication and
the data structures used to support it... other than
that and the code, there are no other details but
I would be happy to respond to specific questions.
There are also some performance results from the
last Xen Summit North America here:
Note that the deduplication is performed only on pages
in tmem ephemeral pools. If you are interested in page
sharing across all guest memory, that is a completely different
> -----Original Message-----
> From: Kaustubh Kabra [mailto:kaustubhwise@xxxxxxxxx]
> Sent: Thursday, August 26, 2010 6:01 AM
> To: Xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] Memory de-duplication
> I have gone through the details of tmem and the patch provided by
> a group consisting Dan Magenheimer as,
> [Xen-devel] [PATCH] [xen-unstable] tmem: add page deduplication with
> opt .
> The further details of the project as such are not available . So I
> request someone,who is aware of further development, to provide
> information about current status of the project.
Xen-devel mailing list