From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chong Li Subject: Re: [PATCH v4 for Xen 4.6 4/4] xl: enable per-VCPU parameter settings for RTDS scheduler Date: Sun, 9 Aug 2015 09:53:10 -0500 Message-ID: References: <1436590356-3706-1-git-send-email-chong.li@wustl.edu> <1436590356-3706-5-git-send-email-chong.li@wustl.edu> <1438075514.2889.33.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1438075514.2889.33.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Chong Li , Wei Liu , Sisu Xi , George Dunlap , xen-devel , Meng Xu , Dagaen Golomb List-Id: xen-devel@lists.xenproject.org On Tue, Jul 28, 2015 at 4:25 AM, Dario Faggioli wrote: > On Fri, 2015-07-10 at 23:52 -0500, Chong Li wrote: >> Change main_sched_rtds and related output functions to support >> per-VCPU settings. >> > This patch also looks nice. A few comments provided inline. > > >> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c >> index c858068..da7c8a6 100644 >> --- a/tools/libxl/xl_cmdimpl.c >> +++ b/tools/libxl/xl_cmdimpl.c >> @@ -5630,6 +5630,37 @@ static int sched_domain_set(int domid, const libxl_domain_sched_params *scinfo) >> return rc; >> } >> >> +static int sched_vcpu_get(libxl_scheduler sched, int domid, >> + libxl_vcpu_sched_params *scinfo) >> +{ >> + int rc; >> + >> + rc = libxl_vcpu_sched_params_get(ctx, domid, scinfo); >> + if (rc) { >> + fprintf(stderr, "libxl_vcpu_sched_params_get failed.\n"); >> + return rc; >> + } >> + if (scinfo->sched != sched) { >> + fprintf(stderr, "libxl_vcpu_sched_params_get returned %s not %s.\n", >> + libxl_scheduler_to_string(scinfo->sched), >> + libxl_scheduler_to_string(sched)); >> + return ERROR_INVAL; >> > We are in xl, so there's no need to use libxl error code. It's probably > not strictly forbidden either, and xl itself is really inconsistent > about this, I know. > > Personally, I never use them, and I think that using them may be > confusing, and create even more inconsistency. > What error code should I use here? Do I also need to change the "ERROR_INVAL" in function sched_domain_get? > -- > <> (Raistlin Majere) > ----------------------------------------------------------------- > Dario Faggioli, Ph.D, http://about.me/dario.faggioli > Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) -- Chong Li Department of Computer Science and Engineering Washington University in St.louis