From: Gary Pennington Subject: [PATCH][HVM] Improve shadow paging performance for 64 bit solaris guests Date: Tue, 3 Jun 2008 16:46:28 +0100 Message-ID: <20080603154628.GF6138@barman.uk.sun.com> Reply-To: Gary Pennington Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The following patch provides a 'fast-path' for sh_remove_write_access() for 64 bit Solaris HVM guests. This provides a significant performance boost for such guests; our testing shows a 200-400% improvement in microbenchmarks such as fork(), exit(), etc... The patch was developed against 3.1.4 and I've checked that it still applies against xen-unstable. Could you please also apply the patch to 3.2? BTW: The change to multi.c isn't strictly part of the patch, it was just a bit of cleanup I spotted when I was developing the patch and testing out enabling/disabling different optimisations. Thanks, Gary -- Gary Pennington Solaris Core OS Sun Microsystems Gary.Pennington@sun.com --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xen.hg.patch" --- old/xen/arch/x86/mm/shadow/common.c Tue May 20 00:29:37 2008 +++ new/xen/arch/x86/mm/shadow/common.c Tue May 20 00:29:35 2008 @@ -1820,6 +1820,11 @@ gfn = mfn_to_gfn(v->domain, gmfn); GUESS(0xffff810000000000UL + (gfn << PAGE_SHIFT), 4); GUESS(0x0000010000000000UL + (gfn << PAGE_SHIFT), 4); + /* + * 64bit Solaris kernel page map at + * kpm_vbase; 0xfffffe0000000000UL + */ + GUESS(0xfffffe0000000000UL + (gfn << PAGE_SHIFT), 4); } #endif /* CONFIG_PAGING_LEVELS >= 4 */ #endif /* CONFIG_PAGING_LEVELS >= 3 */ --- old/xen/arch/x86/mm/shadow/multi.c Tue May 20 00:29:39 2008 +++ new/xen/arch/x86/mm/shadow/multi.c Tue May 20 00:29:38 2008 @@ -3821,7 +3821,9 @@ shadow_l1e_t *sl1e; int done = 0; int flags; +#if SHADOW_OPTIMIZATIONS & SHOPT_WRITABLE_HEURISTIC mfn_t base_sl1mfn = sl1mfn; /* Because sl1mfn changes in the foreach */ +#endif SHADOW_FOREACH_L1E(sl1mfn, sl1e, 0, done, { --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --fUYQa+Pmc3FrFX/N--