ia64/xen-unstable

changeset 18939:c2dad16819b5

x86, shadow: Avoid duplicates in fixup tables.

Avoid entering duplicates in fixup tables, reducing fixup evictions.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Dec 18 11:28:25 2008 +0000 (2008-12-18)
parents b33b745cd5ec
children 768759d4e319
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Thu Dec 18 11:27:37 2008 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Thu Dec 18 11:28:25 2008 +0000
     1.3 @@ -627,6 +627,15 @@ void oos_fixup_add(struct vcpu *v, mfn_t
     1.4              idx = (idx + 1) % SHADOW_OOS_PAGES;
     1.5          if ( mfn_x(oos[idx]) == mfn_x(gmfn) )
     1.6          {
     1.7 +            int i;
     1.8 +            for ( i = 0; i < SHADOW_OOS_FIXUPS; i++ )
     1.9 +            {
    1.10 +                if ( mfn_valid(oos_fixup[idx].smfn[i])
    1.11 +                     && (mfn_x(oos_fixup[idx].smfn[i]) == mfn_x(smfn))
    1.12 +                     && (oos_fixup[idx].off[i] == off) )
    1.13 +                    return;
    1.14 +            }
    1.15 +
    1.16              next = oos_fixup[idx].next;
    1.17  
    1.18              if ( mfn_x(oos_fixup[idx].smfn[next]) != INVALID_MFN )