[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Always insert entry to VHPT's head, or double TLB miss occurs.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |