Hi Kaustubh –
The ephemeral pages are clean pages that have been evicted
by any tmem-enabled guest OS due to memory pressure. These
pages include not only executables but also many normal
files that are never written (such as source files in a compile)
or have been written awhile ago but may be used later (such
as object files from a compile that are later used by the
There have been a number of attempted implementations
of more general page sharing in Xen (similar to KSM for KVM).
See “Difference Engine” by Diwaker Gupta and the
papers it references. A version of “Satori”
is in Xen 4.0. Pointers to these can be found here:
These papers discuss the challenges... the biggest one is
that CoW must work even if there is no more memory available,
which requires some form of “host swapping”
In tmem, since ephemeral pages can be discarded at any
time, this CoW problem does not occur and tmem deduplication
is much easier to implement.
From: Kaustubh Kabra
Sent: Thursday, August 26, 2010 11:56 PM
Cc: Dan Magenheimer
Subject: Ephemeral pages - Possible extension
Yes, we 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 pages
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 ?