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

2015-10-01 Thread Dario Faggioli
On Thu, 2015-10-01 at 01:49 -0600, Jan Beulich wrote: > > > > On 29.09.15 at 18:56, 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); >

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

2015-10-01 Thread Jan Beulich
>>> On 29.09.15 at 18:56, 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)

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

2015-09-30 Thread Dario Faggioli
On Thu, 2015-10-01 at 07:28 +0200, Juergen Gross wrote: > On 09/29/2015 06:56 PM, Dario Faggioli wrote: > > --- a/xen/common/schedule.c > > +++ b/xen/common/schedule.c > > @@ -1501,8 +1501,8 @@ int schedule_cpu_switch(unsigned int cpu, > > struct cpupool *c) > > return 0; > > > >

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

2015-09-30 Thread Juergen Gross
On 09/29/2015 06:56 PM, Dario Faggioli wrote: The .alloc_pdata hook of the scheduler interface is called, in schedule_cpu_switch(), unconditionally, for all schedulers. This forces even schedulers that do not require any actual allocation of per-pCPU data to: - contain an implementation of the

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

2015-09-29 Thread Dario Faggioli
The .alloc_pdata hook of the scheduler interface is called, in schedule_cpu_switch(), unconditionally, for all schedulers. This forces even schedulers that do not require any actual allocation of per-pCPU data to: - contain an implementation of the hook; - return some artificial non-NULL value t