From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: Xen Mem Page Sharing -> Implementation Date: Fri, 10 Feb 2012 13:44:17 +0000 Message-ID: <20120210134417.GA30945@ocelot.phlegethon.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Peter Deng Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, At 13:07 -0500 on 08 Feb (1328706468), Peter Deng wrote: > So looking through the code, I am getting that the mechanisms for sharing > the pages are present within the hypervisor and the hypervisor will manage > the sharing and unsharing of pages. Now, this leads me into a question that > regards the implementation of sharing pages. In the research articles I > have read, hashing was used to determine the contents of similar pages; is > there code implementation present in Xen that does this or something > related in that area? If so, where is it in the source code? No, Xen itself does not contain any code for selecting which pages to share. We leave that to the tools. Incidentally, here are some reasons why hashing pages of RAM and scanning for duplicates might not be such a great idea: http://www.usenix.org/events/usenix09/tech/full_papers/milos/milos_html/index.html (N.B.: that paper does _not_ describe the page-sharing interface that's currently in Xen; Satori was a research prototype for sharing memory between _PV_ guests). Tim.