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

Re: [Xen-devel] [PATCH v2 1/5] xen: sched: improve robustness (and rename) DOM2OP()



On Fri, 2017-04-07 at 09:44 +0100, George Dunlap wrote:
> On 07/04/17 01:33, Dario Faggioli wrote:
> > Clarify and enforce (with ASSERTs) when the function
> > is called on the idle domain, and explain in comments
> > what it means and when it is ok to do so.
> > 
> > While there, change the name of the function to a more
> > self-explanatory one, and do the same to VCPU2OP.
> > 
> > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> 
> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> 
> With one nit...
> 
> > --- a/xen/common/schedule.c
> > +++ b/xen/common/schedule.c
> > @@ -77,8 +77,25 @@ static struct scheduler __read_mostly ops;
> >           (( (opsptr)->fn != NULL ) ? (opsptr)->fn(opsptr,
> > ##__VA_ARGS__ )  \
> >            : (typeof((opsptr)->fn(opsptr, ##__VA_ARGS__)))0 )
> >  
> > -#define DOM2OP(_d)    (((_d)->cpupool == NULL) ? &ops : ((_d)-
> > >cpupool->sched))
> > -static inline struct scheduler *VCPU2OP(const struct vcpu *v)
> > +static inline struct scheduler *dom_scheduler(const struct domain
> > *d)
> > +{
> > +    if ( likely(d->cpupool != NULL) )
> > +        return d->cpupool->sched;
> > +
> > +    /*
> > +     * If d->cpupool is NULL, this is the idle domain. This is
> > special
> > +     * because the idle domain does not really bolong to any
> > cpupool, and,
> 
> *belong
> 
Ah. Sorry! :-(

> I can fix this up on check-in if need be.
> 
Yes, feel free.

And the same for the other typo reported by Alan in 3/5, if you're up
for it (and it's the case that there aren't any other reason to resend,
of course).

Thanks,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

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

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

 


Rackspace

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