[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Speed up bulk p2m operations such as domain creation



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1173692674 0
# Node ID 3be7f638cba03c3195f6327f9f8d9265a4382829
# Parent  8a01644306ee024eb49a195a50662d04021aefa1
[HVM] Speed up bulk p2m operations such as domain creation
by not flushing the shadows more often than is needed.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    6 +++++-
 xen/arch/x86/mm/shadow/multi.c  |    2 ++
 xen/include/asm-x86/domain.h    |    3 +++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff -r 8a01644306ee -r 3be7f638cba0 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Sun Mar 11 22:42:22 2007 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Mon Mar 12 09:44:34 2007 +0000
@@ -2813,7 +2813,11 @@ shadow_write_p2m_entry(struct vcpu *v, u
        This is pretty heavy handed, but this is a rare operation
        (it might happen a dozen times during boot and then never
        again), so it doesn't matter too much. */
-    shadow_blow_tables(d);
+    if ( d->arch.paging.shadow.has_fast_mmio_entries )
+    {
+        shadow_blow_tables(d);
+        d->arch.paging.shadow.has_fast_mmio_entries = 0;
+    }
 #endif
 
     shadow_unlock(d);
diff -r 8a01644306ee -r 3be7f638cba0 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Sun Mar 11 22:42:22 2007 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Mon Mar 12 09:44:34 2007 +0000
@@ -660,6 +660,8 @@ _sh_propagate(struct vcpu *v,
     {
         /* Guest l1e maps MMIO space */
         *sp = sh_l1e_mmio(guest_l1e_get_gfn(*gp), gflags);
+        if ( !d->arch.paging.shadow.has_fast_mmio_entries )
+            d->arch.paging.shadow.has_fast_mmio_entries = 1;
         goto done;
     }
 
diff -r 8a01644306ee -r 3be7f638cba0 xen/include/asm-x86/domain.h
--- a/xen/include/asm-x86/domain.h      Sun Mar 11 22:42:22 2007 +0000
+++ b/xen/include/asm-x86/domain.h      Mon Mar 12 09:44:34 2007 +0000
@@ -78,6 +78,9 @@ struct shadow_domain {
     /* Shadow hashtable */
     struct shadow_page_info **hash_table;
     int hash_walking;  /* Some function is walking the hash table */
+
+    /* Fast MMIO path heuristic */
+    int has_fast_mmio_entries;
 
     /* Shadow log-dirty bitmap */
     unsigned long *dirty_bitmap;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.