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

Re: [Xen-devel] [PATCH v1 3/4] libxl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler



On Fri, 2015-05-15 at 10:24 -0500, Chong Li wrote:
> On Mon, May 11, 2015 at 9:06 AM, Dario Faggioli
> <dario.faggioli@xxxxxxxxxx> wrote:
> >
> > On Thu, 2015-05-07 at 12:05 -0500, Chong Li wrote:
> > > Change sched_rtds_domain_get/set functions to support per-VCPU settings 
> > > for RTDS scheduler.
> > >
> 
> >
> > > +    rc = xc_domain_getinfo(CTX->xch, domid, 1, &info);
> > > +    if (rc < 0) {
> > > +        LOGE(ERROR, "getting domain info");
> > > +        return ERROR_FAIL;
> > > +    }
> > > +    num_vcpus = info.nr_online_vcpus;
> > >
> > It looks like the most of other places in libxl where this is necessary
> > use libxl_list_vcpu(), which, if you want to open code it, uses
> > info.max_vcpu_id. I'd do the same.
> 
> Do you mean invoking libxl_list_vcpu() here, or still using
> xc_domain_getinfo() (but get the
> total number of vcpus by info.max_vcpu_id instead of
> info.nr_online_vcpus)?
>
The latter: use info.max_vcpu_id instead of nr_online_vcpus.

I cited libxl_list_vcpu() as an example, to point you an example that
does something similar to what you want to do here, i.e., main_vcpupin()
in xl_cmdimpl.c, which calls libxl_list_vcpus() to retrieve the maximum
number of vcpus, and then uses it... But, really, the point was that you
should use the max.

In fact, it makes sense to me that the user should be able to set the
scheduling parameters of all the vcpus, even the ones that are, at the
moment, offlined, don't you think?

Regards,
Dario

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