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

2016-04-05 Thread Dario Faggioli
On Mon, 2016-04-04 at 00:13 -0600, Jan Beulich wrote: > > > > On 01.04.16 at 19:01, wrote: > > Ok, I'll do: > > > > sd->sched_priv = SCHED_OP(&ops, alloc_pdata, cpu); > > if ( IS_ERR(sd->sched_priv) ) > > { > > int err = PTR_ERR(sd->sched_priv); > > > > sd->sched_priv

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

2016-04-04 Thread Jan Beulich
>>> On 01.04.16 at 19:01, wrote: > On Mon, 2016-03-21 at 09:07 -0600, Jan Beulich wrote: >> > > > On 21.03.16 at 15:48, wrote: >> > On 18/03/16 20:04, Dario Faggioli wrote: >> > > @@ -1491,9 +1491,9 @@ static int cpu_schedule_up(unsigned int >> > > cpu) >> > > if ( idle_vcpu[cpu] == NULL ) >

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

2016-04-03 Thread Juergen Gross
On 01/04/16 19:01, Dario Faggioli wrote: > On Mon, 2016-03-21 at 09:07 -0600, Jan Beulich wrote: > On 21.03.16 at 15:48, wrote: >>> On 18/03/16 20:04, Dario Faggioli wrote: @@ -1491,9 +1491,9 @@ static int cpu_schedule_up(unsigned int cpu) if ( idle_vcpu[cpu] == NULL )

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

2016-04-01 Thread Dario Faggioli
On Mon, 2016-03-21 at 09:07 -0600, Jan Beulich wrote: > > > > On 21.03.16 at 15:48, wrote: > > On 18/03/16 20:04, Dario Faggioli wrote: > > > @@ -1491,9 +1491,9 @@ static int cpu_schedule_up(unsigned int > > > cpu) > > >  if ( idle_vcpu[cpu] == NULL ) > > >  return -ENOMEM; > > >   > >

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

2016-03-24 Thread Dario Faggioli
On Thu, 2016-03-24 at 03:43 -0600, Jan Beulich wrote: > > > > On 23.03.16 at 18:36, wrote: > >  > > But of course that means files like sched_arinc653.c and > > sched_credit2.c > > end up including xen/err.c even though they don't use those macros. > > Would you prefer the other files include it d

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

2016-03-24 Thread Jan Beulich
>>> On 23.03.16 at 18:36, wrote: > On 21/03/16 14:22, Jan Beulich wrote: > On 18.03.16 at 20:04, wrote: >>> --- a/xen/include/xen/sched-if.h >>> +++ b/xen/include/xen/sched-if.h >>> @@ -9,6 +9,7 @@ >>> #define __XEN_SCHED_IF_H__ >>> >>> #include >>> +#include >>> >>> /* A global poin

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

2016-03-23 Thread George Dunlap
On 18/03/16 19:04, Dario Faggioli wrote: > The .alloc_pdata scheduler hook must, before this change, > be implemented by all schedulers --even those ones that > don't need to allocate anything. > > Make it possible to just use the SCHED_OP(), like for > the other hooks, by using ERR_PTR() and IS_E

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

2016-03-23 Thread George Dunlap
On 21/03/16 14:22, Jan Beulich wrote: On 18.03.16 at 20:04, wrote: >> --- a/xen/include/xen/sched-if.h >> +++ b/xen/include/xen/sched-if.h >> @@ -9,6 +9,7 @@ >> #define __XEN_SCHED_IF_H__ >> >> #include >> +#include >> >> /* A global pointer to the initial cpupool (POOL0). */ >> ext

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

2016-03-21 Thread Jan Beulich
>>> On 21.03.16 at 15:48, wrote: > On 18/03/16 20:04, Dario Faggioli wrote: >> --- a/xen/common/schedule.c >> +++ b/xen/common/schedule.c >> @@ -1491,9 +1491,9 @@ static int cpu_schedule_up(unsigned int cpu) >> if ( idle_vcpu[cpu] == NULL ) >> return -ENOMEM; >> >> -if ( (ops.a

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

2016-03-21 Thread Juergen Gross
On 18/03/16 20:04, Dario Faggioli wrote: > The .alloc_pdata scheduler hook must, before this change, > be implemented by all schedulers --even those ones that > don't need to allocate anything. > > Make it possible to just use the SCHED_OP(), like for > the other hooks, by using ERR_PTR() and IS_E

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

2016-03-21 Thread Jan Beulich
>>> On 18.03.16 at 20:04, wrote: > --- a/xen/include/xen/sched-if.h > +++ b/xen/include/xen/sched-if.h > @@ -9,6 +9,7 @@ > #define __XEN_SCHED_IF_H__ > > #include > +#include > > /* A global pointer to the initial cpupool (POOL0). */ > extern struct cpupool *cpupool0; There is no visibl

[Xen-devel] [PATCH 03/16] xen: sched: make implementing .alloc_pdata optional

2016-03-19 Thread Dario Faggioli
The .alloc_pdata scheduler hook must, before this change, be implemented by all schedulers --even those ones that don't need to allocate anything. Make it possible to just use the SCHED_OP(), like for the other hooks, by using ERR_PTR() and IS_ERR() for error reporting. This: - makes NULL a varia

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

2016-03-19 Thread Meng Xu
On Fri, Mar 18, 2016 at 3:04 PM, Dario Faggioli wrote: > The .alloc_pdata scheduler hook must, before this change, > be implemented by all schedulers --even those ones that > don't need to allocate anything. > > Make it possible to just use the SCHED_OP(), like for > the other hooks, by using ERR_