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

Re: [Xen-devel] [PATCH v4 for Xen 4.6 4/4] xl: enable per-VCPU parameter settings for RTDS scheduler



On Tue, Jul 28, 2015 at 4:25 AM, Dario Faggioli
<dario.faggioli@xxxxxxxxxx> 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?

> --
> <<This happens because I choose it to happen!>> (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

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