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-devel

[Xen-devel] [PATCH] credit2: Add more debugging

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] credit2: Add more debugging
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Thu, 03 Mar 2011 14:35:57 +0000
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Thu, 03 Mar 2011 06:35:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r f71212f712fd -r a3dd5d721c41 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 14:35:11 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,32 @@
 
     /* Protected by runqueue lock */        
 
+    /* DEBUG */
+    if ( !is_idle_vcpu(scurr->vcpu) && scurr->rqd != rqd)
+    {
+        int other_rqi=-1, this_rqi;
+
+        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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>