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-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Avoid duplicates in fixup tables.
From: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>
Date: Thu, 18 Dec 2008 09:55:49 +0000
Delivery-date: Thu, 18 Dec 2008 02:01:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Avoid duplicates in fixup tables., Gianluca Guida <=