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

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

To: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] credit2: Add more debugging
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 3 Mar 2011 16:38:19 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 03 Mar 2011 08:39:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <a3dd5d721c410f68ecd8.1299162957@elijah>
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>
Newsgroups: chiark.mail.xen.devel
References: <a3dd5d721c410f68ecd8.1299162957@elijah>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
George Dunlap writes ("[Xen-devel] [PATCH] credit2: Add more debugging"):
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
...
> +    /* 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.

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

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