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

Re: [Xen-devel] [PATCH v5 for Xen 4.7 3/4] libxl: enable per-VCPU parameter settings for RTDS scheduler



On Mon, Feb 08, 2016 at 04:59:46PM -0600, Chong Li wrote:
> On Mon, Feb 8, 2016 at 5:07 AM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
> >
> >
> > [...]
> > > >> +        num_vcpus = max_vcpuid + 1;
> > > >> +        GCNEW_ARRAY(vcpus, num_vcpus);
> > > >> +        if (sched_rtds_validate_params(gc, scinfo->vcpus[0].period,
> > > >> +                                 scinfo->vcpus[0].budget,
> > > >
> > > > This doesn't make sense. You take this path because scinfo->num_vcpus is
> > > > 0 but now you're dereferencing scinfo->vcpus[0]. Do I miss anything?
> > > For commands like " xl sched-rtds -d vm1 -v all -p 1000 -b 1000"
> > > (which sets all vcpus with
> > > the same scheduling parameters), we pass the budget and period via
> > > scinfo->vcpus[0].
> > >
> > > I'll add more explanation here.
> >
> > No, adding more explanation won't help.
> >
> > Let me explain a bit. Libxl is the library that can be used by multiple
> > applications. Xl is just one of the applications. The other application
> > that I know of is libvirt.
> >
> > So, the incarnation of a particular xl command is of no concern how we
> > define the semantics of a libxl API. That is, you can come up with an
> > unambiguous API but still support the same xl command.
> >
> > Currently the semantics of this (new?) libxl API seems to be broken,
> > because you're (ab)using num_vcpus to represent a special case. In
> > effect you can't really whether the array is empty. When num_vcpus is 0,
> > you shouldn't dereference vcpus array, at all, because the semantics of
> > num_vcpus == 0 is that the array is empty.
> >
> > Wei.
> 
> I see. I'll think about re-designing the data structure of
> libxl_vcpu_sched_params.
> 

Or you can come up with a new API (function) that sets parameter for all
vcpus at once? Just a random thought.

You can post your proposed data structure and / or the API  here.  We
can discuss this a bit before you actually start writing code, so that
you avoid wasting effort.

Wei.

> Chong
> >
> > > >
> > > >> +                                 &vcpus[0].s.rtds.period,
> > > >> +                                 &vcpus[0].s.rtds.budget))
> > > >
> > >
> > > --
> > > Chong Li
> > > Department of Computer Science and Engineering
> > > Washington University in St.louis
> 
> 
> 
> 
> -- 
> Chong Li
> Department of Computer Science and Engineering
> Washington University in St.louis

_______________________________________________
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®.