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: Wed, 1 Jul 2015 09:48:02 +0100 Message-ID: <1435740482.21469.233.camel@citrix.com> References: <1435545899-22751-1-git-send-email-chong.li@wustl.edu> <1435545899-22751-4-git-send-email-chong.li@wustl.edu> <1435667216.21469.122.camel@citrix.com> <1435679837.21469.218.camel@citrix.com> <1435681194.21469.223.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Meng Xu Cc: Chong Li , Wei Liu , Sisu Xi , George Dunlap , "dario.faggioli" , Ian Jackson , xen-devel , Meng Xu , Chong Li , Dagaen Golomb List-Id: xen-devel@lists.xenproject.org On Tue, 2015-06-30 at 17:54 -0700, Meng Xu wrote: > Hi Ian, > > 2015-06-30 9:19 GMT-07:00 Ian Campbell : > > On Tue, 2015-06-30 at 11:10 -0500, Chong Li wrote: > >> On Tue, Jun 30, 2015 at 10:57 AM, Ian Campbell 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". > > > > vcpuid in the libxl is not the key but the value. > > When it is passed into hypervisor, vcpuid acts as the key to identify > which VCPU. vcpuid should be be negative when it is passed to > hypervisor. > > Do you have any concerns about assigning the initial value of vcpuid as -1? libxl needs to do _something_ if it is passed a vcpuid=-1. What is that something? Ian.