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

[Xen-devel] [PATCH] Avoid duplicates in fixup tables.



This patch avoids entering duplicates in fixup tables, reducing fixup evictions.

Signed-off-by: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>

diff -r a76b4e00e186 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Tue Dec 16 13:14:25 2008 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Dec 18 09:53:47 2008 +0000
@@ -627,6 +627,15 @@ void oos_fixup_add(struct vcpu *v, mfn_t
             idx = (idx + 1) % SHADOW_OOS_PAGES;
         if ( mfn_x(oos[idx]) == mfn_x(gmfn) )
         {
+            int i;
+            for ( i = 0; i < SHADOW_OOS_FIXUPS; i++ )
+            {
+                if ( mfn_valid(oos_fixup[idx].smfn[i])
+                     && (mfn_x(oos_fixup[idx].smfn[i]) == mfn_x(smfn))
+                     && (oos_fixup[idx].off[i] == off) )
+                    return;
+            }
+
             next = oos_fixup[idx].next;
 
             if ( mfn_x(oos_fixup[idx].smfn[next]) != INVALID_MFN )
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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