Hi Dan, 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 understanding correct? 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 ? Thanks, -- *Kaustubh Kabra http://www.kaustubhwise.000a.biz* _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan Magenheimer
2010-Aug-27 17:18 UTC
[Xen-devel] RE: Ephemeral pages - Possible extension
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 linker). 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 many papers it references. A version of "Satori" (Gregor Milos) is in Xen 4.0. Pointers to these can be found here: http://www.xen.org/community/xenpapers.html 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" capability. 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. Dan From: Kaustubh Kabra [mailto:kaustubhwise@gmail.com] Sent: Thursday, August 26, 2010 11:56 PM To: Xen-devel@lists.xensource.com Cc: Dan Magenheimer Subject: Ephemeral pages - Possible extension Hi Dan, 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 understanding correct? 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 ? Thanks, -- Kaustubh Kabra http://www.kaustubhwise.000a.biz _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel