[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/7] xen: sched_rt: avoid ASSERT()ing on runq dump if there are no domains



On Tue, 2015-03-17 at 10:41 +0000, Jan Beulich wrote:
> >>> On 16.03.15 at 18:04, <dario.faggioli@xxxxxxxxxx> wrote:
> > --- a/xen/common/sched_rt.c
> > +++ b/xen/common/sched_rt.c
> > @@ -264,18 +264,17 @@ rt_dump(const struct scheduler *ops)
> >      struct list_head *iter_sdom, *iter_svc, *runq, *depletedq, *iter;
> >      struct rt_private *prv = rt_priv(ops);
> >      struct rt_vcpu *svc;
> > -    cpumask_t *online;
> >      struct rt_dom *sdom;
> >      unsigned long flags;
> >  
> > -    ASSERT(!list_empty(&prv->sdom));
> > +    spin_lock_irqsave(&prv->lock, flags);
> > +
> > +    if (list_empty(&prv->sdom))
> 
> Coding style.
> 
Gah! Sure.... sorry!

> > +        goto out;
> >  
> > -    sdom = list_entry(prv->sdom.next, struct rt_dom, sdom_elem);
> > -    online = cpupool_scheduler_cpumask(sdom->dom->cpupool);
> 
> Unrelated change (together with the variable deletion above). I'm
> fine for this to stay here, but it should at least be mentioned in the
> description so that future archeologists don't wonder about the
> connection to the actual issue fixed here.
> 
Ok, I'll update the changelog, including also a mention to the fact that
I'm moving up the spinlock acquisition as (I think) George is also
suggesting to.

> > @@ -303,6 +302,7 @@ rt_dump(const struct scheduler *ops)
> >          }
> >      }
> >  
> > +out:
> 
> Labels should be indented by at least one space.
> 
I checked all the sched_* file, and this is rather inconsistent. What
I'll do is indent this one appropriately, which will make things even
more inconsistent (in sched_rt.c there is only another 'out:' label, and
it's not indented), and then send an independent cleanup patch
afterwards... hope it is fine.

Thanks and Regards,
Dario

> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.