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] Fix tlbflush_clock

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix tlbflush_clock
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Feb 2007 09:40:49 -0800
Delivery-date: Fri, 09 Feb 2007 10:37:17 -0800
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 awilliam@xxxxxxxxxxxx
# Date 1170710667 25200
# Node ID d9f7f4f9c7ff86484afb047accdad23e1482637f
# Parent  e0a5cef6332a70012768ba6d3a3abb893cb8eb92
[IA64] Fix tlbflush_clock

arch_vcpu.tlbflush_timestamp is unused and
new_tlbflush_clock_period() flushes vhpt unnecessarily.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c    |    3 --
 xen/arch/ia64/xen/flushtlb.c  |   44 +++++++-----------------------------------
 xen/arch/ia64/xen/vhpt.c      |    4 ---
 xen/include/asm-ia64/domain.h |    3 --
 4 files changed, 8 insertions(+), 46 deletions(-)

diff -r e0a5cef6332a -r d9f7f4f9c7ff xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon Feb 05 13:55:47 2007 -0700
+++ b/xen/arch/ia64/xen/domain.c        Mon Feb 05 14:24:27 2007 -0700
@@ -448,9 +448,6 @@ int vcpu_late_initialise(struct vcpu *v)
                assign_domain_page(d, IA64_XMAPPEDREGS_PADDR(v->vcpu_id) + i,
                                   virt_to_maddr(v->arch.privregs + i));
 
-       tlbflush_update_time(&v->arch.tlbflush_timestamp,
-                            tlbflush_current_time());
-
        return 0;
 }
 
diff -r e0a5cef6332a -r d9f7f4f9c7ff xen/arch/ia64/xen/flushtlb.c
--- a/xen/arch/ia64/xen/flushtlb.c      Mon Feb 05 13:55:47 2007 -0700
+++ b/xen/arch/ia64/xen/flushtlb.c      Mon Feb 05 14:24:27 2007 -0700
@@ -59,46 +59,18 @@ tlbflush_clock_inc_and_return(void)
     return t2;
 }
 
+static void
+tlbflush_clock_local_flush(void *unused)
+{
+    local_vhpt_flush();
+    local_flush_tlb_all();
+}
+
 void
 new_tlbflush_clock_period(void)
 {
-    /*
-     *XXX TODO
-     * If flushing all vcpu's vhpt takes too long, it can be done backgroundly.
-     * In such case tlbflush time comparison is done using only 31bit
-     * similar to linux jiffies comparison.
-     * vhpt should be flushed gradually before wraping 31bits.
-     *
-     * Sample calculation.
-     * Currently Xen/IA64 can create up to 64 domains at the same time.
-     * Vhpt size is currently 64KB. (This might be changed later though)
-     * Suppose each domains have 4 vcpus (or 16 vcpus).
-     * then the memory size which must be flushed is 16MB (64MB).
-     */    
-    struct domain* d;
-    struct vcpu* v;
-    /* flush all vhpt of vcpu of all existing domain. */
-    read_lock(&domlist_lock);
-    for_each_domain(d) {
-        for_each_vcpu(d, v) {
-            vcpu_purge_tr_entry(&PSCBX(v,dtlb));
-            vcpu_purge_tr_entry(&PSCBX(v,itlb));
-        }
-    }
-    smp_mb();
-    for_each_domain(d) {
-        for_each_vcpu(d, v) {
-            if (!test_bit(_VCPUF_initialised, &v->vcpu_flags) || VMX_DOMAIN(v))
-                continue;
-            if (HAS_PERVCPU_VHPT(v->domain))
-                vcpu_vhpt_flush(v);
-        }
-    }
-    read_unlock(&domlist_lock);
-    /* unlock has release semantics */
-
     /* flush all vhpt of physical cpu and mTLB */
-    on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
+    on_each_cpu(tlbflush_clock_local_flush, NULL, 1, 1);
 
     /*
      * if global TLB shootdown is finished, increment tlbflush_time
diff -r e0a5cef6332a -r d9f7f4f9c7ff xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Mon Feb 05 13:55:47 2007 -0700
+++ b/xen/arch/ia64/xen/vhpt.c  Mon Feb 05 14:24:27 2007 -0700
@@ -54,11 +54,7 @@ void
 void
 vcpu_vhpt_flush(struct vcpu* v)
 {
-       /* increment flush clock before flush */
-       u32 flush_time = tlbflush_clock_inc_and_return();
        __vhpt_flush(vcpu_vhpt_maddr(v));
-       /* this must be after flush */
-       tlbflush_update_time(&v->arch.tlbflush_timestamp, flush_time);
        perfc_incrc(vcpu_vhpt_flush);
 }
 
diff -r e0a5cef6332a -r d9f7f4f9c7ff xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h     Mon Feb 05 13:55:47 2007 -0700
+++ b/xen/include/asm-ia64/domain.h     Mon Feb 05 14:24:27 2007 -0700
@@ -200,9 +200,6 @@ struct arch_vcpu {
     struct page_info*   vhpt_page;
     unsigned long       vhpt_entries;
 #endif
-#ifdef CONFIG_XEN_IA64_TLBFLUSH_CLOCK
-    u32 tlbflush_timestamp;
-#endif
 #define INVALID_PROCESSOR       INT_MAX
     int last_processor;
 };

_______________________________________________
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] Fix tlbflush_clock, Xen patchbot-unstable <=