ia64/xen-unstable

changeset 17193:54c7e3798464

[IA64] Stop collision chain search after match is found

No need to continue to search collision chain after one is found
since guest TLB can't have any overlap.

Signed-off-by: Dong Yaozu <eddie.dong@intel.com>
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
author Alex Williamson <alex.williamson@hp.com>
date Fri Mar 07 12:26:27 2008 -0700 (2008-03-07)
parents 59b8768d0d0d
children d5bcf03596cc
files xen/arch/ia64/vmx/vtlb.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vtlb.c	Wed Mar 05 11:18:25 2008 +0000
     1.2 +++ b/xen/arch/ia64/vmx/vtlb.c	Fri Mar 07 12:26:27 2008 -0700
     1.3 @@ -324,8 +324,10 @@ static void vtlb_purge(VCPU *v, u64 va, 
     1.4          while (num) {
     1.5              cur = vtlb_thash(hcb->pta, curadr, vrr.rrval, &tag);
     1.6              while (cur) {
     1.7 -                if (cur->etag == tag && cur->ps == rr_ps)
     1.8 +                if (cur->etag == tag && cur->ps == rr_ps) {
     1.9                      cur->etag = 1UL << 63;
    1.10 +                    break;
    1.11 +                }
    1.12                  cur = cur->next;
    1.13              }
    1.14              curadr += size;
    1.15 @@ -353,8 +355,10 @@ static void vhpt_purge(VCPU *v, u64 va, 
    1.16          cur = (thash_data_t *)ia64_thash(start);
    1.17          tag = ia64_ttag(start);
    1.18          while (cur) {
    1.19 -            if (cur->etag == tag)
    1.20 +            if (cur->etag == tag) {
    1.21                  cur->etag = 1UL << 63; 
    1.22 +                break;
    1.23 +            }
    1.24              cur = cur->next;
    1.25          }
    1.26          start += size;