[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 for Xen 4.6 3/4] libxl: enable per-VCPU parameter settings for RTDS scheduler
On Tue, Jun 30, 2015 at 11:19 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: > On Tue, 2015-06-30 at 11:10 -0500, Chong Li wrote: >> On Tue, Jun 30, 2015 at 10:57 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> >> wrote: >> > On Tue, 2015-06-30 at 10:42 -0500, Chong Li wrote: >> >> >> @@ -1554,10 +1564,17 @@ int libxl_sched_credit_params_set(libxl_ctx >> >> >> *ctx, uint32_t poolid, >> >> >> #define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1 >> >> >> #define LIBXL_DOMAIN_SCHED_PARAM_BUDGET_DEFAULT -1 >> >> >> >> >> >> +/* Per-VCPU parameters*/ >> >> >> +#define LIBXL_DOMAIN_SCHED_PARAM_VCPU_INDEX_DEFAULT -1 >> >> > >> >> > What is the effect of passing vcpuid == -1 to this interface? >> >> >> >> I think the right way should be: >> >> >> >> #define LIBXL_SCHED_PARAM_VCPU_INDEX_DEFAULT -1 >> >> >> >> which is the default value for the vcpuid in libxl_sched_params. Even >> >> though libxl_sched_params is used for per-vcpu settings, all the other >> >> fields (except vcpuid) would still use >> >> LIBXL_DOMAIN_SCHED_PARAM_*_DEFAULT values, just for convenience. >> > >> > My question is what does the concept of vcpu==-1 mean in this interface? >> >> We need a default value for vcpuid when initiating libxl_sched_params, >> just like other fields (e.g., budget, weight ...) in the struct. But >> the default value could be others, maybe "0". I'm not sure. > > What will you do if you come across a -1 in this field? What are the > semantics of the interface WRT this field. > > Note that this field is not the same as the others in this struct, it is > in effect part of the "key" while the others are the "values". > For example, if vm1 has 4 VCPUs, and the user types in: "xl rtds -d vm1 -v 1 -v 3" to get (output) the per-vcpu information of VCPU 1 and VCPU 3. In libxl.c, we create an array (say vcpus), which has two elements (each one is a libxl_sched_params). Then we do: vcpus[0].vcpuid = 1; vcpus[1].vcpuid = 3; and all the other fields in each libxl_sched_params keep empty, but will be filled in by the hypercall handler. So vcpuid == -1 only exists during initiation, and it will be definitely given a valid value later. Chong > Ian. > -- 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |