[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Stop collision chain search after match is found



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1204917987 25200
# Node ID 54c7e3798464dfa2e2ba1d725126cceaf935155b
# Parent  59b8768d0d0d3bf2125c33adafbd1256e75e2755
[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@xxxxxxxxx>
Signed-off-by: Zhang Xiantao <xiantao.zhang@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vtlb.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 59b8768d0d0d -r 54c7e3798464 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Wed Mar 05 11:18:25 2008 +0000
+++ b/xen/arch/ia64/vmx/vtlb.c  Fri Mar 07 12:26:27 2008 -0700
@@ -324,8 +324,10 @@ static void vtlb_purge(VCPU *v, u64 va, 
         while (num) {
             cur = vtlb_thash(hcb->pta, curadr, vrr.rrval, &tag);
             while (cur) {
-                if (cur->etag == tag && cur->ps == rr_ps)
+                if (cur->etag == tag && cur->ps == rr_ps) {
                     cur->etag = 1UL << 63;
+                    break;
+                }
                 cur = cur->next;
             }
             curadr += size;
@@ -353,8 +355,10 @@ static void vhpt_purge(VCPU *v, u64 va, 
         cur = (thash_data_t *)ia64_thash(start);
         tag = ia64_ttag(start);
         while (cur) {
-            if (cur->etag == tag)
+            if (cur->etag == tag) {
                 cur->etag = 1UL << 63; 
+                break;
+            }
             cur = cur->next;
         }
         start += size;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.