All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Avoid duplicates in fixup tables.
@ 2008-12-18  9:55 Gianluca Guida
  0 siblings, 0 replies; only message in thread
From: Gianluca Guida @ 2008-12-18  9:55 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 145 bytes --]

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

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>


[-- Attachment #2: fixup_add-check-duplicates.patch --]
[-- Type: text/x-patch, Size: 793 bytes --]

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 )

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-18  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18  9:55 [PATCH] Avoid duplicates in fixup tables Gianluca Guida

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.