From: Ian Jackson Subject: Re: [PATCH] credit2: Add more debugging Date: Thu, 3 Mar 2011 16:38:19 +0000 Message-ID: <19823.50171.23733.518505@mariner.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org George Dunlap writes ("[Xen-devel] [PATCH] credit2: Add more debugging"): > Signed-off-by: George Dunlap ... > + /* DEBUG */ Shouldn't this be in an #ifdef or something rather than just marked with a comment ? > + 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); And in general this seems like a somewhat odd construct. Ian.