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

Re: [Xen-devel] [PATCH 5/9] xen: sched: make implementing .alloc_pdata optional



On Thu, 2015-10-01 at 01:49 -0600, Jan Beulich wrote:
> > > > On 29.09.15 at 18:56, <dario.faggioli@xxxxxxxxxx> wrote:
> > @@ -1501,8 +1501,8 @@ int schedule_cpu_switch(unsigned int cpu,
> > struct cpupool *c)
> >          return 0;
> >  
> >      idle = idle_vcpu[cpu];
> > -    ppriv = SCHED_OP(new_ops, alloc_pdata, cpu);
> > -    if ( ppriv == NULL )
> > +    if ( (new_ops->alloc_pdata != NULL) &&
> > +         ((ppriv = new_ops->alloc_pdata(new_ops, cpu)) == NULL) )
> >          return -ENOMEM;
> 
> I think this should be solved without open coding SCHED_OP():
> Make use of the helpers in xen/err.h and have NULL become a
> variant of success.
>
I see. There are other occurrences of the open coded variant, so I just
went for it for the sake of this patch.

But yes, I guess I can have a look at what you suggest, add a
preparatory which does that to the series, and convert all existing
cases (and then, of course, use the same approach when I get to this
one).

Thanks and Regards,
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
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®.