[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04/16] xen: sched: implement .init_pdata in all schedulers
On Fri, Mar 18, 2016 at 3:04 PM, Dario Faggioli <dario.faggioli@xxxxxxxxxx> wrote: > by borrowing some of the code of .alloc_pdata, i.e., > the bits that perform initializations, leaving only > actual allocations in there, when any, which is the > case for Credit1 and RTDS. I didn't follow the commit log. I think the reason why we "have to" implement .init_pdata in all schedulers is missing in the commit log. > diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c > index ac8019f..b6ac3ad 100644 > --- a/xen/common/sched_rt.c > +++ b/xen/common/sched_rt.c > @@ -649,8 +649,8 @@ rt_deinit(struct scheduler *ops) > * Point per_cpu spinlock to the global system lock; > * All cpu have same global system lock > */ > -static void * > -rt_alloc_pdata(const struct scheduler *ops, int cpu) > +static void > +rt_init_pdata(const struct scheduler *ops, void *pdata, int cpu) > { > struct rt_private *prv = rt_priv(ops); > spinlock_t *old_lock; > @@ -663,7 +663,11 @@ rt_alloc_pdata(const struct scheduler *ops, int cpu) > > /* _Not_ pcpu_schedule_unlock(): per_cpu().schedule_lock changed! */ > spin_unlock_irqrestore(old_lock, flags); > +} > > +static void * > +rt_alloc_pdata(const struct scheduler *ops, int cpu) > +{ > if ( !alloc_cpumask_var(&_cpumask_scratch[cpu]) ) > return ERR_PTR(-ENOMEM); > > @@ -1395,6 +1399,7 @@ static const struct scheduler sched_rtds_def = { > .deinit = rt_deinit, > .alloc_pdata = rt_alloc_pdata, > .free_pdata = rt_free_pdata, > + .init_pdata = rt_init_pdata, > .alloc_domdata = rt_alloc_domdata, > .free_domdata = rt_free_domdata, > .init_domain = rt_dom_init, > Reviewed-by: Meng Xu <mengxu@xxxxxxxxxxxxx> Thanks, Meng -- Meng Xu PhD Student in Computer and Information Science University of Pennsylvania http://www.cis.upenn.edu/~mengxu/ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |