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] credit2: Trace and debug key tweaks

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] credit2: Trace and debug key tweaks
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Nov 2010 04:50:35 -0700
Delivery-date: Tue, 02 Nov 2010 04:52:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir@xxxxxxx>
# Date 1288344033 -3600
# Node ID 2d5e8f4ac43a120bbb5d4c52d08f6980848f0166
# Parent  141a82d068fd592eeddd7156841b23b1db64ff3c
credit2: Trace and debug key tweaks

* Add traces for credit reset and scheduling a tasklet
* Remove tsc for traces which probably don't need them
* Print domain info in the debug dump

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/common/sched_credit2.c |   36 ++++++++++++++++++++++++++++++++----
 1 files changed, 32 insertions(+), 4 deletions(-)

diff -r 141a82d068fd -r 2d5e8f4ac43a xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Fri Oct 29 10:20:08 2010 +0100
+++ b/xen/common/sched_credit2.c        Fri Oct 29 10:20:33 2010 +0100
@@ -40,6 +40,8 @@
 #define TRC_CSCHED2_CREDIT_ADD  TRC_SCHED_CLASS + 4
 #define TRC_CSCHED2_TICKLE_CHECK TRC_SCHED_CLASS + 5
 #define TRC_CSCHED2_TICKLE       TRC_SCHED_CLASS + 6
+#define TRC_CSCHED2_CREDIT_RESET TRC_SCHED_CLASS + 7
+#define TRC_CSCHED2_SCHED_TASKLET TRC_SCHED_CLASS + 8
 
 /*
  * WARNING: This is still in an experimental phase.  Status and work can be 
found at the
@@ -306,7 +308,7 @@ runq_insert(const struct scheduler *ops,
         d.dom = svc->vcpu->domain->domain_id;
         d.vcpu = svc->vcpu->vcpu_id;
         d.pos = pos;
-        trace_var(TRC_CSCHED2_RUNQ_POS, 1,
+        trace_var(TRC_CSCHED2_RUNQ_POS, 0,
                   sizeof(d),
                   (unsigned char *)&d);
     }
@@ -421,7 +423,11 @@ static void reset_credit(const struct sc
     {
         struct csched_vcpu * svc = list_entry(iter, struct csched_vcpu, 
rqd_elem);
 
+        int start_credit;
+
         BUG_ON( is_idle_vcpu(svc->vcpu) );
+
+        start_credit = svc->credit;
 
         /* "Clip" credits to max carryover */
         if ( svc->credit > CSCHED_CARRYOVER_MAX )
@@ -430,7 +436,19 @@ static void reset_credit(const struct sc
         svc->credit += CSCHED_CREDIT_INIT;
         svc->start_time = now;
 
-        /* FIXME: Trace credit */
+        /* TRACE */ {
+            struct {
+                unsigned dom:16,vcpu:16;
+                unsigned credit_start, credit_end;
+            } d;
+            d.dom = svc->vcpu->domain->domain_id;
+            d.vcpu = svc->vcpu->vcpu_id;
+            d.credit_start = start_credit;
+            d.credit_end = svc->credit;
+            trace_var(TRC_CSCHED2_CREDIT_RESET, 0,
+                      sizeof(d),
+                      (unsigned char *)&d);
+        }
     }
 
     /* No need to resort runqueue, as everyone's order should be the same. */
@@ -476,7 +494,7 @@ void burn_credits(struct csched_runqueue
         d.vcpu = svc->vcpu->vcpu_id;
         d.credit = svc->credit;
         d.delta = delta;
-        trace_var(TRC_CSCHED2_CREDIT_BURN, 1,
+        trace_var(TRC_CSCHED2_CREDIT_BURN, 0,
                   sizeof(d),
                   (unsigned char *)&d);
     }
@@ -961,16 +979,21 @@ csched_schedule(
     else
         snext = __runq_elem(runq->next);
 
+    if ( tasklet_work_scheduled )
+        trace_var(TRC_CSCHED2_SCHED_TASKLET, 0, 0,  NULL);
+
     if ( !is_idle_vcpu(current) && vcpu_runnable(current) )
     {
         /* If the current vcpu is runnable, and has higher credit
          * than the next on the runqueue, and isn't being preempted
          * by a tasklet, run him again.
          * Otherwise, set him for delayed runq add. */
+
         if ( !tasklet_work_scheduled && scurr->credit > snext->credit)
             snext = scurr;
         else
             set_bit(__CSFLAG_delayed_runq_add, &scurr->flags);
+        
     }
 
     if ( snext != scurr && !is_idle_vcpu(snext->vcpu) )
@@ -1095,12 +1118,17 @@ csched_dump(const struct scheduler *ops)
 
     /* FIXME: Locking! */
 
-    printk("active vcpus:\n");
+    printk("Domain info:\n");
     loop = 0;
     list_for_each( iter_sdom, &prv->sdom )
     {
         struct csched_dom *sdom;
         sdom = list_entry(iter_sdom, struct csched_dom, sdom_elem);
+
+       printk("\tDomain: %d w %d v %d\n\t", 
+              sdom->dom->domain_id, 
+              sdom->weight, 
+              sdom->nr_vcpus);
 
         list_for_each( iter_svc, &sdom->vcpu )
         {

_______________________________________________
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] credit2: Trace and debug key tweaks, Xen patchbot-unstable <=