WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.4-testing] shadow dirty-VRAM: avoid multiple remo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] shadow dirty-VRAM: avoid multiple remove_all_mappings calls.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Oct 2009 06:05:26 -0700
Delivery-date: Tue, 27 Oct 2009 06:08:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256648260 0
# Node ID 48ccb3d1ebd040f990d948975e3956184f389dc4
# Parent  8058e77a9d0ecd904b82f2f1d0f5fd8f7054b4f8
shadow dirty-VRAM: avoid multiple remove_all_mappings calls.

sh_remove_all_mappings() will walk roughly half of the shadow L1
tables for each MFN it's called with; calling it for every MFN in a
guest's framebuffer can be _very_ expensive, especially with the
shadow lock held across the whole operation.  Avoid that by just
blowing away all the shadows.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset:   20366:19d6d811bc15
xen-unstable date:        Mon Oct 26 12:18:50 2009 +0000
---
 xen/arch/x86/mm/shadow/common.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff -r 8058e77a9d0e -r 48ccb3d1ebd0 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Tue Oct 27 12:45:17 2009 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Tue Oct 27 12:57:40 2009 +0000
@@ -3613,12 +3613,9 @@ int shadow_track_dirty_vram(struct domai
      * no need to be careful. */
     if ( !d->dirty_vram )
     {
-        /* Just recount from start. */
-        for ( i = begin_pfn; i < end_pfn; i++ ) {
-            mfn_t mfn = gfn_to_mfn(d, i, &t);
-            if (mfn_x(mfn) != INVALID_MFN)
-                flush_tlb |= sh_remove_all_mappings(d->vcpu[0], mfn);
-        }
+        /* Throw away all the shadows rather than walking through them 
+         * up to nr times getting rid of mappings of each pfn */
+        shadow_blow_tables(d);
 
         gdprintk(XENLOG_INFO, "tracking VRAM %lx - %lx\n", begin_pfn, end_pfn);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] shadow dirty-VRAM: avoid multiple remove_all_mappings calls., Xen patchbot-3.4-testing <=