On Fri, 2017-03-17 at 01:42 -0600, Jan Beulich wrote: > > > > On 16.03.17 at 22:30, 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 -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)