[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] credit2: Add more debugging



# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1299165270 0
# Node ID 9dfd7ffcd76c70191dcca9be0820483baa6cafa3
# Parent  f71212f712fd8dad7997785fd61edca28c0d9536
credit2: Add more debugging

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r f71212f712fd -r 9dfd7ffcd76c xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Wed Mar 02 10:31:06 2011 +0000
+++ b/xen/common/sched_credit2.c        Thu Mar 03 15:14:30 2011 +0000
@@ -808,6 +808,7 @@
 __runq_deassign(struct csched_vcpu *svc)
 {
     BUG_ON(__vcpu_on_runq(svc));
+    BUG_ON(test_bit(__CSFLAG_scheduled, &svc->flags));
 
     list_del_init(&svc->rqd_elem);
     update_max_weight(svc->rqd, 0, svc->weight);
@@ -1603,6 +1604,31 @@
 
     /* Protected by runqueue lock */        
 
+    /* DEBUG */
+    if ( !is_idle_vcpu(scurr->vcpu) && scurr->rqd != rqd)
+    {
+        int other_rqi = -1, this_rqi = c2r(ops, cpu);
+
+        if ( scurr->rqd )
+        {
+            int rq;
+            other_rqi = -2;
+            for_each_cpu_mask ( rq, CSCHED_PRIV(ops)->active_queues )
+            {
+                if ( scurr->rqd == &CSCHED_PRIV(ops)->rqd[rq] )
+                {
+                    other_rqi = rq;
+                    break;
+                }
+            }
+        }
+        printk("%s: pcpu %d rq %d, but scurr d%dv%d assigned to "
+               "pcpu %d rq %d!\n",
+               __func__,
+               cpu, this_rqi,
+               scurr->vcpu->domain->domain_id, scurr->vcpu->vcpu_id,
+               scurr->vcpu->processor, other_rqi);
+    }
     BUG_ON(!is_idle_vcpu(scurr->vcpu) && scurr->rqd != rqd);
 
     /* Clear "tickled" bit now that we've been scheduled */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.