xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anshul Makkar <anshulmakkar@gmail.com>
To: Juergen Gross <jgross@suse.com>, xen-devel@lists.xen.org
Cc: wei.liu2@citrix.com, konrad.wilk@oracle.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	dario.faggioli@citrix.com, ian.jackson@eu.citrix.com,
	jbeulich@suse.com
Subject: Re: [PATCH 2/3] credit2: libxl related changes to add support for runqueue per cpupool.
Date: Thu, 16 Nov 2017 21:10:22 +0000	[thread overview]
Message-ID: <c59be0e6-4101-663e-3679-ec30a02db909@gmail.com> (raw)
In-Reply-To: <34e3d0e3-b3cb-eae3-f8d0-90f604f1e3cc@suse.com>

[Trimming the Cc-list a bit]


On 9/14/17 7:37 AM, Juergen Gross wrote:
> On 12/09/17 02:45, anshulmakkar wrote:
>> Introduces scheduler specific parameter at libxl level which are
>> passed on to libxc. eg runqueue for credit2
>>
>> Signed-off-by: Anshul Makkar <anshulmakkar@gmail.com>
>>
>>   int libxl_cpupool_destroy(libxl_ctx *ctx, uint32_t poolid);
>>   int libxl_cpupool_rename(libxl_ctx *ctx, const char *name, uint32_t poolid);
>>   int libxl_cpupool_cpuadd(libxl_ctx *ctx, uint32_t poolid, int cpu);
>> diff --git a/tools/libxl/libxl_cpupool.c b/tools/libxl/libxl_cpupool.c
>> index 85b0688..e3ce7b3 100644
>> --- a/tools/libxl/libxl_cpupool.c
>> +++ b/tools/libxl/libxl_cpupool.c
>> @@ -130,7 +130,7 @@ int libxl_get_freecpus(libxl_ctx *ctx, libxl_bitmap *cpumap)
>>   int libxl_cpupool_create(libxl_ctx *ctx, const char *name,
>>                            libxl_scheduler sched,
>>                            libxl_bitmap cpumap, libxl_uuid *uuid,
>> -                         uint32_t *poolid)
>> +                         uint32_t *poolid, const libxl_scheduler_params *sched_params)
>>   {
>>       GC_INIT(ctx);
>>       int rc;
>> @@ -138,6 +138,7 @@ int libxl_cpupool_create(libxl_ctx *ctx, const char *name,
>>       xs_transaction_t t;
>>       char *uuid_string;
>>       uint32_t xcpoolid;
>> +    xc_schedparam_t xc_sched_param;
>>   
>>       /* Accept '0' as 'any poolid' for backwards compatibility */
>>       if ( *poolid == LIBXL_CPUPOOL_POOLID_ANY
>> @@ -151,8 +152,18 @@ int libxl_cpupool_create(libxl_ctx *ctx, const char *name,
>>           GC_FREE;
>>           return ERROR_NOMEM;
>>       }
>> +    if (sched_params)
>> +    {
>> +        xc_sched_param.u.sched_credit2.ratelimit_us =
>> +                                                    sched_params->u.credit2.ratelimit_us;
>> +        xc_sched_param.u.sched_credit2.runq = sched_params->u.credit2.runqueue;
>> +        xc_sched_param.u.sched_credit.tslice_ms = sched_params->u.credit.tslice_ms;
>> +        xc_sched_param.u.sched_credit.ratelimit_us = sched_params->u.credit.ratelimit_us;
> Don't you need some input parameter validation here?
Agree. Will perform validation.
>> +    }
>> +    else
>> +        xc_sched_param.u.sched_credit2.runq = LIBXL_CREDIT2_RUNQUEUE_DEFAULT;
> So you are passing the LIBXL defines down to the hypervisor expecting
> they match. I think this is a major layering violation.
I need to pass the DEFAULT runq arrangement if the user has not selected
any option and I want to do it near to the top level (libxc) so that 
consistency
can be maintained at the lower scheduler layer.
Please can you suggest alternative that will maintain layering consistency.
>
>
>
> Juergen
anshul


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-11-16 21:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  0:45 implement runqueue per cpupool anshulmakkar
2017-09-12  0:45 ` [PATCH 1/3] credit2: libxc related changes to add support for " anshulmakkar
2017-09-14  6:42   ` Juergen Gross
2017-09-14 12:58     ` Dario Faggioli
2019-01-17 16:10       ` anshul
2019-01-17 16:17         ` Juergen Gross
2017-09-14 13:28   ` Dario Faggioli
2017-09-12  0:45 ` [PATCH 2/3] credit2: libxl " anshulmakkar
2017-09-14  6:37   ` Juergen Gross
2017-11-16 21:10     ` Anshul Makkar [this message]
2017-11-17  6:58       ` Juergen Gross
2017-09-12  0:45 ` [PATCH 3/3] credit2: xen " anshulmakkar
2017-09-14  6:24   ` Juergen Gross
2017-09-14 10:03   ` Jan Beulich
2017-09-14 14:08   ` Dario Faggioli
2017-09-14  4:21 ` implement " Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c59be0e6-4101-663e-3679-ec30a02db909@gmail.com \
    --to=anshulmakkar@gmail.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).