From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 for Xen 4.6 3/4] libxl: enable per-VCPU parameter settings for RTDS scheduler Date: Tue, 30 Jun 2015 13:26:56 +0100 Message-ID: <1435667216.21469.122.camel@citrix.com> References: <1435545899-22751-1-git-send-email-chong.li@wustl.edu> <1435545899-22751-4-git-send-email-chong.li@wustl.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435545899-22751-4-git-send-email-chong.li@wustl.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chong Li Cc: Chong Li , wei.liu2@citrix.com, Sisu Xi , george.dunlap@eu.citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, Meng Xu , dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org On Sun, 2015-06-28 at 21:44 -0500, Chong Li wrote: > + GC_INIT(ctx); > + libxl_scheduler sched = scinfo->sched; > + int ret; > + > + if (sched == LIBXL_SCHEDULER_UNKNOWN) > + sched = libxl__domain_scheduler(gc, domid); > + > + switch (sched) { > + case LIBXL_SCHEDULER_RTDS: > + ret = sched_rtds_vcpu_set(gc, domid, scinfo); > + break; > + default: > + LOG(ERROR, "Unknown scheduler"); There are several other known schedulers, I don't think the fact that they don't have any need for per-vcpu variables should result in this error message, they should get something more specific to that situation. Only truly unknown values for the scheduler should result in this message. [...] > /* > + * libxl_vcpu_sched_params is used to get/set per-vcpu params > +*/ > +#define LIBXL_HAVE_VCPU_SCHED_PARAMS 1 > + > +/* > + * libxl_sched_params is used to store per-vcpu params > +*/ > +#define LIBXL_SCHED_PARAMS 1 Do we need both of these? In particular I'm not sure what the second one is indicating has changed. > + > +/* > * libxl ABI compatibility > * > * The only guarantee which libxl makes regarding ABI compatibility > @@ -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? Ian.