aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2011-03-03 15:14:30 +0000
committerGeorge Dunlap <george.dunlap@eu.citrix.com>2011-03-03 15:14:30 +0000
commit4804b5c5ae52f6718ca3e9699cdb96a5799b1d84 (patch)
tree4209a8b175a9852c034918cb56c377f877f5f0b2
parent67a93c8da5b99374ec02dbbc14a70e01ffdab20c (diff)
downloadxen-4804b5c5ae52f6718ca3e9699cdb96a5799b1d84.tar.gz
xen-4804b5c5ae52f6718ca3e9699cdb96a5799b1d84.tar.bz2
xen-4804b5c5ae52f6718ca3e9699cdb96a5799b1d84.zip
credit2: Add more debugging
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org>
-rw-r--r--xen/common/sched_credit2.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index c28f009996..59c13618ed 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -808,6 +808,7 @@ static void
__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 @@ csched_schedule(
/* 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 */