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] xen: Debug 'q' key prints per-vcpu period

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: Debug 'q' key prints per-vcpu periodic timer info.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Mar 2007 13:30:14 -0800
Delivery-date: Fri, 09 Mar 2007 13:30:12 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173468892 0
# Node ID 83756471416f861ddd70a3de0ab187ac1d5c2b17
# Parent  188bab059272ce400bf8e858b4fb8d207655ea7c
xen: Debug 'q' key prints per-vcpu periodic timer info.
Do not enable periodic timer by default for HVM guests.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c   |    3 +++
 xen/common/domain.c     |    3 ---
 xen/common/keyhandler.c |   32 ++++++++++++++++++++++++--------
 3 files changed, 27 insertions(+), 11 deletions(-)

diff -r 188bab059272 -r 83756471416f xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Mar 09 19:33:43 2007 +0000
+++ b/xen/arch/x86/domain.c     Fri Mar 09 19:34:52 2007 +0000
@@ -350,6 +350,9 @@ int vcpu_initialise(struct vcpu *v)
     }
     else
     {
+        /* PV guests by default have a 100Hz ticker. */
+        v->periodic_period = MILLISECS(10);
+
         /* PV guests get an emulated PIT too for video BIOSes to use. */
         if ( !is_idle_domain(d) && (v->vcpu_id == 0) )
             pit_init(v, cpu_khz);
diff -r 188bab059272 -r 83756471416f xen/common/domain.c
--- a/xen/common/domain.c       Fri Mar 09 19:33:43 2007 +0000
+++ b/xen/common/domain.c       Fri Mar 09 19:34:52 2007 +0000
@@ -102,9 +102,6 @@ struct vcpu *alloc_vcpu(
     v->runstate.state = is_idle_vcpu(v) ? RUNSTATE_running : RUNSTATE_offline;
     v->runstate.state_entry_time = NOW();
 
-    /* VCPUs by default have a 100Hz ticker. */
-    v->periodic_period = MILLISECS(10);
-
     if ( (vcpu_id != 0) && !is_idle_domain(d) )
         set_bit(_VCPUF_down, &v->vcpu_flags);
 
diff -r 188bab059272 -r 83756471416f xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Fri Mar 09 19:33:43 2007 +0000
+++ b/xen/common/keyhandler.c   Fri Mar 09 19:34:52 2007 +0000
@@ -135,12 +135,25 @@ static void cpuset_print(char *set, int 
     *set++ = '\0';
 }
 
+static void periodic_timer_print(char *str, int size, uint64_t period)
+{
+    if ( period == 0 )
+    {
+        strlcpy(str, "No periodic timer", size);
+        return;
+    }
+
+    snprintf(str, size,
+             "%u Hz periodic timer (period %u ms)",
+             1000000000/(int)period, (int)period/1000000);
+}
+
 static void dump_domains(unsigned char key)
 {
     struct domain *d;
     struct vcpu   *v;
     s_time_t       now = NOW();
-    char           cpuset[100];
+    char           tmpstr[100];
 
     printk("'%c' pressed -> dumping domain info (now=0x%X:%08X)\n", key,
            (u32)(now>>32), (u32)now);
@@ -150,11 +163,11 @@ static void dump_domains(unsigned char k
     for_each_domain ( d )
     {
         printk("General information for domain %u:\n", d->domain_id);
-        cpuset_print(cpuset, sizeof(cpuset), d->domain_dirty_cpumask);
+        cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask);
         printk("    flags=%lx refcnt=%d nr_pages=%d xenheap_pages=%d "
                "dirty_cpus=%s\n",
                d->domain_flags, atomic_read(&d->refcnt),
-               d->tot_pages, d->xenheap_pages, cpuset);
+               d->tot_pages, d->xenheap_pages, tmpstr);
         printk("    handle=%02x%02x%02x%02x-%02x%02x-%02x%02x-"
                "%02x%02x-%02x%02x%02x%02x%02x%02x vm_assist=%08lx\n",
                d->handle[ 0], d->handle[ 1], d->handle[ 2], d->handle[ 3],
@@ -179,18 +192,21 @@ static void dump_domains(unsigned char k
                    v->vcpu_flags,
                    vcpu_info(v, evtchn_upcall_pending),
                    vcpu_info(v, evtchn_upcall_mask));
-            cpuset_print(cpuset, sizeof(cpuset), v->vcpu_dirty_cpumask);
-            printk("dirty_cpus=%s ", cpuset);
-            cpuset_print(cpuset, sizeof(cpuset), v->cpu_affinity);
-            printk("cpu_affinity=%s\n", cpuset);
+            cpuset_print(tmpstr, sizeof(tmpstr), v->vcpu_dirty_cpumask);
+            printk("dirty_cpus=%s ", tmpstr);
+            cpuset_print(tmpstr, sizeof(tmpstr), v->cpu_affinity);
+            printk("cpu_affinity=%s\n", tmpstr);
             arch_dump_vcpu_info(v);
+            periodic_timer_print(tmpstr, sizeof(tmpstr), v->periodic_period);
+            printk("    %s\n", tmpstr);
             printk("    Notifying guest (virq %d, port %d, stat %d/%d/%d)\n",
                    VIRQ_DEBUG, v->virq_to_evtchn[VIRQ_DEBUG],
                    test_bit(v->virq_to_evtchn[VIRQ_DEBUG], 
                             shared_info_addr(d, evtchn_pending)),
                    test_bit(v->virq_to_evtchn[VIRQ_DEBUG], 
                             shared_info_addr(d, evtchn_mask)),
-                   
test_bit(v->virq_to_evtchn[VIRQ_DEBUG]/BITS_PER_GUEST_LONG(d),
+                   test_bit(v->virq_to_evtchn[VIRQ_DEBUG] /
+                            BITS_PER_GUEST_LONG(d),
                             vcpu_info_addr(v, evtchn_pending_sel)));
             send_guest_vcpu_virq(v, VIRQ_DEBUG);
         }

_______________________________________________
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] xen: Debug 'q' key prints per-vcpu periodic timer info., Xen patchbot-unstable <=