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

Re: [Xen-devel] [PATCH] xen: sched: don't call hooks of the wrong scheduler via VCPU2OP



On Fri, 2017-03-17 at 01:42 -0600, Jan Beulich wrote:
> > > > On 16.03.17 at 22:30, <dario.faggioli@xxxxxxxxxx> wrote:
> > +{
> > +    struct domain *d = v->domain;
> > +
> > +    if ( likely(d->cpupool != NULL) )
> > +        return d->cpupool->sched;
> > +
> > +    /* v->processor never changes for idle vcpus, so using it here
> > is safe */
> > +    if ( likely(is_idle_domain(d)) )
> > +        return per_cpu(scheduler, v->processor);
> > +    else
> > +        return &ops;
> 
> Having read through the description, I don't think I can conclude
> why using &ops here is correct (or at least benign). And even if
> this was explained in the description, I think a brief comment
> would be rather desirable here (the more that it having been
> &ops implicitly was wrong before as per the description).
> 
Well, looking at all the callers, basically we never return ops.

I guess I was being overly conservative about keeping somewhat intact
the implant of original code.

I'll send v2 with both a comment and an ASSERT() for making things more
clear.

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®.