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

[Xen-changelog] [xen-unstable] [IA64] Always insert entry to VHPT's head

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Always insert entry to VHPT's head, or double TLB miss occurs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:14:37 -0700
Delivery-date: Mon, 04 Jun 2007 03:13:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1178222479 21600
# Node ID 8924215a5f952d3127d24203a14e4b8d7e642a69
# Parent  6cf6f49f26abd61e011a6513512478d7d2a0af70
[IA64] Always insert entry to VHPT's head, or double TLB miss occurs.

Always insert entry to VHPT head, or TLB miss will occur again although
the translation exists in its collision chain.

Signed-off-by: Zhang xiantao <xiantao.zhang@xxxxxxxxx>
Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vtlb.c |   48 +++++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 20 deletions(-)

diff -r 6cf6f49f26ab -r 8924215a5f95 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Thu May 03 13:55:28 2007 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Thu May 03 14:01:19 2007 -0600
@@ -150,33 +150,41 @@ static void vmx_vhpt_insert(thash_cb_t *
     tag = ia64_ttag(ifa);
     cch = head;
     while (cch) {    
-        if (INVALID_VHPT(cch)) {
-            len = cch->len;
-            cch->page_flags = pte;
-            cch->len = len;
-            cch->itir = rr.ps << 2;
-            cch->etag = tag;
-            return;
-        }
+        if (INVALID_VHPT(cch))
+            break;
         cch = cch->next;
     }
-
-    if(head->len>=MAX_CCN_DEPTH){
-        thash_recycle_cch(hcb, head);
-        cch = cch_alloc(hcb);
+    if (cch) {
+        if (cch == head) {
+            len = head->len;
+        } else {
+            local_irq_disable();
+            cch->page_flags = head->page_flags;
+            cch->itir = head->itir;
+            cch->etag  = head->etag;
+            len = head->len;
+            local_irq_enable();
+        }
     }
     else{
-        cch = __alloc_chain(hcb);
-    }
-    local_irq_disable();
-    *cch = *head;
+        if (head->len >= MAX_CCN_DEPTH) {
+            thash_recycle_cch(hcb, head);
+            cch = cch_alloc(hcb);
+        } else {
+            cch = __alloc_chain(hcb);
+        }
+        local_irq_disable();
+        *cch = *head;
+        head->next = cch;
+        len = cch->len+1;
+        cch->len = 0;
+        local_irq_enable();
+    }
+
     head->page_flags=pte;
+    head->len = len;
     head->itir = rr.ps << 2;
     head->etag=tag;
-    head->next = cch;
-    head->len = cch->len+1;
-    cch->len = 0;
-    local_irq_enable();
     return;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Always insert entry to VHPT's head, or double TLB miss occurs., Xen patchbot-unstable <=