Skip to contentSkip to conversation

Avoid duplicates in fixup tables.

PATCH New Gianluca Guida 1 participant 1 message Dec 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid duplicates in fixup tables.

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

xen/arch/x86/mm/shadow/common.c +9 -0
diff -r a76b4e00e186 xen/arch/x86/mm/shadow/common.c
@@ -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
[email protected]
http://lists.xensource.com/xen-devel