From: George Dunlap Subject: Re: [PATCH] credit2: Add more debugging Date: Thu, 03 Mar 2011 16:48:26 +0000 Message-ID: <1299170906.19262.72.camel@elijah> References: <19823.50171.23733.518505@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19823.50171.23733.518505@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: George Dunlap , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org The purpose of this was to catch more information next time you see this bug in the automated testing; do you run it with debug=y? If so, I'll change it to #ifndef NDEBUG ... #else BUG_ON() ... #endif -George On Thu, 2011-03-03 at 16:38 +0000, Ian Jackson wrote: > 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.