From: priya sehgal Subject: Re: Shadow Page Tables in Xen Date: Tue, 21 Apr 2009 17:07:46 +0530 (IST) Message-ID: <46562.49315.qm@web8405.mail.in.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Thanks Tim.=0A> Why are you interested? Do you have a project in=0A> mind?= =0A=0AWe have a course project, in which we have to improve the performanc= e of live migration for HVM guests. It seems that to support live migration= , all the page table entries in the shadow page table are marked as write p= rotected, so as to know which pages are dirtied and to be sent to the other= machine. Since, there will be many page faults leading to performance degr= adation, we want to reduce these page faults. In our course project, we are= supposed to form groups of pages and if any page in the group hits the pag= e fault (due to write-protection), we mark all the pages in the group as RW= . This way we can reduce the page faults. =0A=0AThis is based on some hueri= stic that if a page is written, its immediate neighbors will also be writte= n. =0A=0AMy concern was that since we will be touching the same shadow page= table and marking its PTEs as RO or RW during different epochs we should n= ot break something existing. =0A=0APriya.I =0A--- On Tue, 4/21/09, Tim Deeg= an wrote:=0A=0A> From: Tim Deegan =0A> Subject: Re: [Xen-devel] Shadow Page Tables in Xen=0A> To: "priy= a sehgal" =0A> Cc: "xen-devel@lists.xensource.com" =0A> Date: Tuesday, April 21, 2009, 2:07 PM=0A= > Hi, =0A> =0A> At 20:34 +0100 on 20 Apr (1240259658), priya sehgal wrote:= =0A> > I was going through the memory management in Xen and=0A> little conf= used=0A> > about shadow page tables for HVM guest and how they=0A> work.=0A= > =0A> Why are you interested?=A0 Do you have a project in=0A> mind? =0A> = =0A> > Few of my questions are :=0A> > 1. A shadow page table, is a copy of= the guest page=0A> table, with actual machine frame numbers (MFN), as agai= nst=0A> the physical page number(PFN) in case of guests. =0A> > Do the shad= ow page tables write protect each of the=0A> PTE it contains, or only the p= ages containing the "guest=0A> page table" are write protected (to check if= the guest has=0A> modified any entry)? =0A> =0A> They write-protect all pa= getables and some other things but=0A> not all of=0A> memory; that wouldn't= be very useful.=0A> =0A> > 2. I know that live migration is supported on x= en, but=0A> not sure if it works for HVM guests. In this case also, xen=0A>= will need to keep a shadow page table, which should detect=0A> which pages= have been modified since the last time the pages=0A> were migrated. For th= is, shadow page table should mark all=0A> the PTEs as write protected. Does= xen implement live=0A> migration of HVM guests in this way ? =0A> > If yes= , then is this shadow table same as the one used=0A> in (1), or there are m= ultiple copies of the shadow tables=0A> for different purposes?=0A> =0A> Th= ere's only one set of shadows, since the MMU can only use=0A> one at a=0A> = time. =0A> =0A> Cheers,=0A> =0A> Tim.=0A> =0A> > Thanks.=0A> > Priya=0A> > = =0A> > =0A> >=A0 =A0 =A0=A0=A0=0A> > =0A> > _______________________________= ________________=0A> > Xen-devel mailing list=0A> > Xen-devel@lists.xensour= ce.com=0A> > http://lists.xensource.com/xen-devel=0A> =0A> -- =0A> Tim Deeg= an =0A> Principal Software Engineer, Citrix Systems = (R&D) Ltd.=0A> [Company #02300071, SL9 0DZ, UK.]=0A> =0A=0A=0A